From 9cd62a24e5680e70edbeb81069e0e01b1fb4874f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 25 Jul 2015 17:06:53 +0200 Subject: [PATCH] Fixed C++11 warnings. invalid suffix on literal; C++11 requires a space between literal and string macro [-Werror=literal-suffix] --- .../outbound_protocols/smtp/SMTP.cpp | 20 +++++++++---------- src/apps/remotedesktop/RemoteView.cpp | 6 +++--- src/apps/tv/config.h | 6 +++--- src/preferences/notifications/GeneralView.cpp | 3 ++- .../drawing/interface/remote/NetReceiver.cpp | 4 ++-- .../drawing/interface/remote/NetSender.cpp | 4 ++-- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp b/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp index f156104fa9..59ad170d0d 100644 --- a/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp +++ b/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp @@ -450,9 +450,9 @@ SMTPProtocol::Open(const char *address, int port, bool esmtp) char *cmd = new char[::strlen(localhost)+8]; if (!esmtp) - ::sprintf(cmd,"HELO %s"CRLF, localhost); + ::sprintf(cmd,"HELO %s" CRLF, localhost); else - ::sprintf(cmd,"EHLO %s"CRLF, localhost); + ::sprintf(cmd,"EHLO %s" CRLF, localhost); if (SendCommand(cmd) != B_OK) { delete[] cmd; @@ -467,7 +467,7 @@ SMTPProtocol::Open(const char *address, int port, bool esmtp) SSL_library_init(); RAND_seed(this,sizeof(SMTPProtocol)); - ::sprintf(cmd, "STARTTLS"CRLF); + ::sprintf(cmd, "STARTTLS" CRLF); if ((p = ::strstr(res, "STARTTLS")) != NULL) { // Server advertises STARTTLS support @@ -489,9 +489,9 @@ SMTPProtocol::Open(const char *address, int port, bool esmtp) // Should send EHLO command again if(!esmtp) - ::sprintf(cmd, "HELO %s"CRLF, localhost); + ::sprintf(cmd, "HELO %s" CRLF, localhost); else - ::sprintf(cmd, "EHLO %s"CRLF, localhost); + ::sprintf(cmd, "EHLO %s" CRLF, localhost); if (SendCommand(cmd) != B_OK) { delete[] cmd; @@ -604,7 +604,7 @@ SMTPProtocol::Login(const char *_login, const char *password) // required for authentication to SMTP-servers. Integrity- // and confidentiality-protection are not implemented, as // they are provided by the use of OpenSSL. - SendCommand("AUTH DIGEST-MD5"CRLF); + SendCommand("AUTH DIGEST-MD5" CRLF); const char *res = fLog.String(); if (strncmp(res, "334", 3) != 0) @@ -677,7 +677,7 @@ SMTPProtocol::Login(const char *_login, const char *password) } if (fAuthType & CRAM_MD5) { //******* CRAM-MD5 Authentication ( tested. works fine [with Cyrus SASL] ) - SendCommand("AUTH CRAM-MD5"CRLF); + SendCommand("AUTH CRAM-MD5" CRLF); const char *res = fLog.String(); if (strncmp(res, "334", 3) != 0) @@ -715,7 +715,7 @@ SMTPProtocol::Login(const char *_login, const char *password) //******* LOGIN Authentication ( tested. works fine) ssize_t encodedsize; // required by our base64 implementation - SendCommand("AUTH LOGIN"CRLF); + SendCommand("AUTH LOGIN" CRLF); const char *res = fLog.String(); if (strncmp(res, "334", 3) != 0) @@ -938,9 +938,9 @@ SMTPProtocol::Send(const char* to, const char* from, BPositionIO *message) delete [] data; if (messageEndedWithCRLF) - cmd = "."CRLF; // The standard says don't add extra CRLF. + cmd = "." CRLF; // The standard says don't add extra CRLF. else - cmd = CRLF"."CRLF; + cmd = CRLF "." CRLF; if (SendCommand(cmd.String()) != B_OK) return B_ERROR; diff --git a/src/apps/remotedesktop/RemoteView.cpp b/src/apps/remotedesktop/RemoteView.cpp index 1f31d75b2e..0693886d1b 100644 --- a/src/apps/remotedesktop/RemoteView.cpp +++ b/src/apps/remotedesktop/RemoteView.cpp @@ -39,9 +39,9 @@ static const uint8 kCursorData[] = { 16 /* size, 16x16 */, }; -#define TRACE(x...) /*printf("RemoteView: "x)*/ -#define TRACE_ALWAYS(x...) printf("RemoteView: "x) -#define TRACE_ERROR(x...) printf("RemoteView: "x) +#define TRACE(x...) /*printf("RemoteView: " x)*/ +#define TRACE_ALWAYS(x...) printf("RemoteView: " x) +#define TRACE_ERROR(x...) printf("RemoteView: " x) typedef struct engine_state { diff --git a/src/apps/tv/config.h b/src/apps/tv/config.h index 85d2075b55..5ddb5e2b75 100644 --- a/src/apps/tv/config.h +++ b/src/apps/tv/config.h @@ -31,9 +31,9 @@ #define NAME "TV" #define REVISION "unknown" #define VERSION "1.1" -#define BUILD __DATE__ " "__TIME__ -#define COPYRIGHT B_UTF8_COPYRIGHT" Marcus Overhagen 2005-2007" +#define BUILD __DATE__ " " __TIME__ +#define COPYRIGHT B_UTF8_COPYRIGHT " Marcus Overhagen 2005-2007" #define INFO1 "DVB - Digital Video Broadcasting TV" -#define APP_SIG "application/x-vnd.Haiku."NAME +#define APP_SIG "application/x-vnd.Haiku." NAME #endif diff --git a/src/preferences/notifications/GeneralView.cpp b/src/preferences/notifications/GeneralView.cpp index 50ca791858..55a1f91a16 100644 --- a/src/preferences/notifications/GeneralView.cpp +++ b/src/preferences/notifications/GeneralView.cpp @@ -239,7 +239,8 @@ GeneralView::_CanFindServer(entry_ref* ref) volume.GetName(volName); BQuery *query = new BQuery(); - query->SetPredicate("(BEOS:APP_SIG==\""kNotificationServerSignature"\")"); + query->SetPredicate("(BEOS:APP_SIG==\"" kNotificationServerSignature + "\")"); query->SetVolume(&volume); query->Fetch(); diff --git a/src/servers/app/drawing/interface/remote/NetReceiver.cpp b/src/servers/app/drawing/interface/remote/NetReceiver.cpp index e342066bc9..d88fcfae7c 100644 --- a/src/servers/app/drawing/interface/remote/NetReceiver.cpp +++ b/src/servers/app/drawing/interface/remote/NetReceiver.cpp @@ -16,8 +16,8 @@ #include #include -#define TRACE(x...) /*debug_printf("NetReceiver: "x)*/ -#define TRACE_ERROR(x...) debug_printf("NetReceiver: "x) +#define TRACE(x...) /*debug_printf("NetReceiver: " x)*/ +#define TRACE_ERROR(x...) debug_printf("NetReceiver: " x) NetReceiver::NetReceiver(BNetEndpoint *listener, StreamingRingBuffer *target) diff --git a/src/servers/app/drawing/interface/remote/NetSender.cpp b/src/servers/app/drawing/interface/remote/NetSender.cpp index 0d7cca0d53..4e2dbb3ac6 100644 --- a/src/servers/app/drawing/interface/remote/NetSender.cpp +++ b/src/servers/app/drawing/interface/remote/NetSender.cpp @@ -16,8 +16,8 @@ #include #include -#define TRACE(x...) /*debug_printf("NetSender: "x)*/ -#define TRACE_ERROR(x...) debug_printf("NetSender: "x) +#define TRACE(x...) /*debug_printf("NetSender: " x)*/ +#define TRACE_ERROR(x...) debug_printf("NetSender: " x) NetSender::NetSender(BNetEndpoint *endpoint, StreamingRingBuffer *source)