mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:53:31 +03:00
misc: fix "warning: empty expression statement has no effect"
Turned several macros into do-while(0) style to allow their use to work find with semicolon. Bug:08e8455ddd (commitcomment-45433279)Follow-up to08e8455dddReported-by: Gisle Vanem Closes #6376
This commit is contained in:
parent
ec424f311a
commit
8ab78f720a
11 changed files with 84 additions and 69 deletions
12
lib/smb.c
12
lib/smb.c
|
|
@ -124,13 +124,17 @@ const struct Curl_handler Curl_handler_smbs = {
|
|||
|
||||
/* Append a string to an SMB message */
|
||||
#define MSGCAT(str) \
|
||||
strcpy(p, (str)); \
|
||||
p += strlen(str);
|
||||
do { \
|
||||
strcpy(p, (str)); \
|
||||
p += strlen(str); \
|
||||
} while(0)
|
||||
|
||||
/* Append a null-terminated string to an SMB message */
|
||||
#define MSGCATNULL(str) \
|
||||
strcpy(p, (str)); \
|
||||
p += strlen(str) + 1;
|
||||
do { \
|
||||
strcpy(p, (str)); \
|
||||
p += strlen(str) + 1; \
|
||||
} while(0)
|
||||
|
||||
/* SMB is mostly little endian */
|
||||
#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue