Skip to content

Commit

Permalink
Fix (linux) compiler warnings in libroken
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Dukhovni committed Nov 12, 2016
1 parent 2d3c21c commit c875345
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/roken/snprintf-test.c
Expand Up @@ -34,6 +34,9 @@
#include "roken.h"
#include <limits.h>

extern int rk_snprintf(char *, size_t, const char *, ...);
extern int rk_vsnprintf(char *, size_t, const char *, va_list);

static int
try (const char *format, ...)
{
Expand Down Expand Up @@ -132,9 +135,10 @@ cmp_with_sprintf_long_long (void)
{
int tot = 0;
long long long_long_values[] = {
((long long)LONG_MIN) -1, LONG_MIN, -17, -1,
0,
1, 17, 4711, 65535, LONG_MAX, ((long long)LONG_MAX) + 1};
((long long)LONG_MIN) - (sizeof(long long) > sizeof(long)),
LONG_MIN, -17, -1, 0, 1, 17, 4711, 65535, LONG_MAX,
((long long)LONG_MAX) + (sizeof(long long) > sizeof(long))
};
int i;

for (i = 0; i < sizeof(long_long_values) / sizeof(long_long_values[0]); ++i) {
Expand Down

0 comments on commit c875345

Please sign in to comment.