build: fix a few compilation warnings.

This commit is contained in:
Sam Hocevar 2014-11-05 00:23:12 +00:00 committed by sam
parent fd7e90d858
commit d979cd4fcd
2 changed files with 3 additions and 3 deletions

View File

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

View File

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