1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

fix compiler warning: empty body in an if/else-statement

This commit is contained in:
Yang Tse 2007-03-23 12:01:19 +00:00
parent 34afb0b257
commit f9eb61e90a

View File

@ -23,25 +23,40 @@
* $Id$ * $Id$
***************************************************************************/ ***************************************************************************/
#include "setup.h"
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *, CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
const char *fmt, ...); const char *fmt, ...);
void Curl_infof(struct SessionHandle *, const char *fmt, ...); void Curl_infof(struct SessionHandle *, const char *fmt, ...);
void Curl_failf(struct SessionHandle *, const char *fmt, ...); void Curl_failf(struct SessionHandle *, const char *fmt, ...);
#if defined(CURL_DISABLE_VERBOSE_STRINGS) #if defined(CURL_DISABLE_VERBOSE_STRINGS)
#if defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
/* C99 compilers support variadic macros */ #if defined(HAVE_CONFIG_H) || \
#define infof(...) defined(HAVE_VARIADIC_MACROS_C99) || defined(HAVE_VARIADIC_MACROS_GCC)
#elif defined(__GNUC__)
/* This style of variable argument macros is an old gcc extension */ #if defined(HAVE_VARIADIC_MACROS_C99)
#define infof(x...) #define infof(...) do { } while (0)
#elif defined(HAVE_VARIADIC_MACROS_GCC)
#define infof(x...) do { } while (0)
#else #else
/* Cast the args to void to make them a noop, side effects notwithstanding */
#define infof (void) #define infof (void)
#endif #endif
#else #else
#define infof Curl_infof
#if (defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#define infof(...) do { } while (0)
#elif defined(__GNUC__)
#define infof(x...) do { } while (0)
#else
#define infof (void)
#endif #endif
#endif
#endif /* CURL_DISABLE_VERBOSE_STRINGS */
#define failf Curl_failf #define failf Curl_failf
#define CLIENTWRITE_BODY 1 #define CLIENTWRITE_BODY 1
@ -70,4 +85,4 @@ int Curl_debug(struct SessionHandle *handle, curl_infotype type,
struct connectdata *conn); struct connectdata *conn);
#endif #endif /* __SENDF_H */