mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Fixup snprintf warning for 32bit systems.
git-svn-id: file:///svn/unbound/trunk@3520 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
e3c8adc297
commit
1af1e720d5
1 changed files with 2 additions and 1 deletions
|
|
@ -42,6 +42,7 @@
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
/* for test */
|
/* for test */
|
||||||
/* #define SNPRINTF_TEST 1 */
|
/* #define SNPRINTF_TEST 1 */
|
||||||
|
|
@ -428,7 +429,7 @@ print_num_llp(char** at, size_t* left, int* ret, void* value,
|
||||||
char buf[PRINT_DEC_BUFSZ];
|
char buf[PRINT_DEC_BUFSZ];
|
||||||
int negative = 0;
|
int negative = 0;
|
||||||
int zero = (value == 0);
|
int zero = (value == 0);
|
||||||
#if defined(UINTPTR_MAX) && defined(UINT32_MAX) && (UINTPTR_MAX == UINT32_MAX)
|
#if defined(SIZE_MAX) && defined(UINT32_MAX) && (UINT32_MAX == SIZE_MAX || INT32_MAX == SIZE_MAX)
|
||||||
/* avoid warning about upcast on 32bit systems */
|
/* avoid warning about upcast on 32bit systems */
|
||||||
unsigned long long llvalue = (unsigned long)value;
|
unsigned long long llvalue = (unsigned long)value;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue