[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 14/219: smtp: fix compiler warning
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 14/219: smtp: fix compiler warning |
Date: |
Wed, 22 May 2019 19:15:53 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit f5a77473c5397982a9e6ad74de20ccab3d5b31cc
Author: Rikard Falkeborn <address@hidden>
AuthorDate: Thu Apr 4 23:13:56 2019 +0200
smtp: fix compiler warning
- Fix clang string-plus-int warning.
Clang 8 warns about adding a string to an int does not append to the
string. Indeed it doesn't, but that was not the intention either. Use
array indexing as suggested to silence the warning. There should be no
functional changes.
(In other words clang warns about "foo"+2 but not &"foo"[2] so use the
latter.)
smtp.c:1221:29: warning: adding 'int' to a string does not append to the
string [-Wstring-plus-int]
eob = strdup(SMTP_EOB + 2);
~~~~~~~~~~~~~~~~^~~~
Closes https://github.com/curl/curl/pull/3729
---
lib/smtp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/smtp.c b/lib/smtp.c
index f3db714b5..fec0026a2 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1218,7 +1218,7 @@ static CURLcode smtp_done(struct connectdata *conn,
CURLcode status,
returned CURLE_AGAIN, we duplicate the EOB now rather than when the
bytes written doesn't equal len. */
if(smtp->trailing_crlf || !conn->data->state.infilesize) {
- eob = strdup(SMTP_EOB + 2);
+ eob = strdup(&SMTP_EOB[2]);
len = SMTP_EOB_LEN - 2;
}
else {
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnurl] 14/219: smtp: fix compiler warning,
gnunet <=