prevent warnings when using the gcc option -Wunreachable-code
This commit is contained in:
@@ -44,6 +44,11 @@
|
||||
#define SIZEOF_LONG_DOUBLE 0
|
||||
#endif
|
||||
|
||||
#ifndef SIZEOF_SIZE_T
|
||||
/* default to 4 bytes for size_t unless defined in the config.h */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#endif
|
||||
|
||||
#ifdef DPRINTF_DEBUG
|
||||
#define HAVE_LONGLONG
|
||||
#define LONG_LONG long long
|
||||
@@ -381,11 +386,12 @@ static long dprintf_Pass1(char *format, va_stack_t *vto, char **endpos,
|
||||
case 'z':
|
||||
/* the code below generates a warning if -Wunreachable-code is
|
||||
used */
|
||||
if (sizeof(size_t) > sizeof(unsigned long))
|
||||
flags |= FLAGS_LONGLONG;
|
||||
if (sizeof(size_t) > sizeof(unsigned int))
|
||||
flags |= FLAGS_LONG;
|
||||
break;
|
||||
#if SIZEOF_SIZE_T>4
|
||||
flags |= FLAGS_LONGLONG;
|
||||
#else
|
||||
flags |= FLAGS_LONG;
|
||||
#endif
|
||||
break;
|
||||
case 'O':
|
||||
#if SIZEOF_CURL_OFF_T > 4
|
||||
flags |= FLAGS_LONGLONG;
|
||||
|
||||
Reference in New Issue
Block a user