Skip to content

Commit

Permalink
Fixed C++11 warnings.
Browse files Browse the repository at this point in the history
invalid suffix on literal; C++11 requires a space between literal and string macro
[-Werror=literal-suffix]
  • Loading branch information
korli committed Jul 25, 2015
1 parent 66fdfe3 commit 9cd62a2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
20 changes: 10 additions & 10 deletions src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/apps/remotedesktop/RemoteView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/apps/tv/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion src/preferences/notifications/GeneralView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions src/servers/app/drawing/interface/remote/NetReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include <stdlib.h>
#include <string.h>

#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)
Expand Down
4 changes: 2 additions & 2 deletions src/servers/app/drawing/interface/remote/NetSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include <stdlib.h>
#include <string.h>

#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)
Expand Down

0 comments on commit 9cd62a2

Please sign in to comment.