From d979cd4fcd4f011b1da8a7c622b47a21ab346fc9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 5 Nov 2014 00:23:12 +0000 Subject: [PATCH] build: fix a few compilation warnings. --- src/common/fd.c | 4 ++-- src/libzzuf/debug.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/fd.c b/src/common/fd.c index fcb755f..f20542e 100644 --- a/src/common/fd.c +++ b/src/common/fd.c @@ -72,13 +72,13 @@ static int maxfd, nfiles; /* Spinlock. This variable protects the fds variable. */ static volatile int fd_spinlock = 0; -static void fd_lock() +static void fd_lock(void) { while (__sync_lock_test_and_set(&fd_spinlock, 1)) ; } -static void fd_unlock() +static void fd_unlock(void) { __sync_synchronize(); fd_spinlock = 0; diff --git a/src/libzzuf/debug.c b/src/libzzuf/debug.c index 3fe0e2a..ab5ed51 100644 --- a/src/libzzuf/debug.c +++ b/src/libzzuf/debug.c @@ -47,7 +47,7 @@ static void mydebug(char const *format, va_list args); char buf[128], *b = buf + 127; \ if (i <= 0) \ append((i = 1 + ~i) ? "-" : "0", 1); /* XXX: hack here */ \ - if (i < 0) \ + if (i + 1 <= 0) \ { \ i = 1 + ~(i + base); /* XXX: special case for INT_MIN */ \ *b-- = hex2char[i % base]; \