build: fix a few compilation warnings.
This commit is contained in:
parent
fd7e90d858
commit
d979cd4fcd
@ -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;
|
||||
|
||||
@ -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]; \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user