mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:13:35 +03:00
prevent warnings when using the gcc option -Wunreachable-code
This commit is contained in:
parent
a331aa0221
commit
4d9517f0b4
3 changed files with 31 additions and 25 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue