prevent warnings when using the gcc option -Wunreachable-code

This commit is contained in:
Daniel Stenberg
2004-05-05 06:57:26 +00:00
parent a331aa0221
commit 4d9517f0b4
3 changed files with 31 additions and 25 deletions

View File

@@ -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;