Fix warnings (some bugs, some spurious)
Many spurious VC warnings not quieted though.
This commit is contained in:
@@ -68,7 +68,7 @@ static void
|
||||
do_readprocauxv(void)
|
||||
{
|
||||
char *p = (void *)auxv;
|
||||
ssize_t bytes;
|
||||
ssize_t bytes = 0;
|
||||
size_t sz = sizeof(auxv) - sizeof(auxv[0]); /* leave terminator */
|
||||
int save_errno = errno;
|
||||
int fd;
|
||||
|
@@ -319,8 +319,8 @@ roken_get_loginname(char *user, size_t usersz)
|
||||
if (errno != ENOENT)
|
||||
return NULL;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
errno = 0;
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
@@ -448,7 +448,7 @@ rk_wcsdup(const unsigned short *);
|
||||
|
||||
#ifndef HAVE_MEMMEM
|
||||
#define memmem rk_smemmem
|
||||
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL memmem(const char *);
|
||||
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL memmem(const void *, size_t, const void *, size_t);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINSOCK
|
||||
|
@@ -41,7 +41,7 @@ ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL
|
||||
sleep(unsigned int seconds)
|
||||
{
|
||||
if (SleepEx(1000 * (DWORD) seconds, FALSE) != 0)
|
||||
return -1;
|
||||
return 1; /* XXX Should get time before and after */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,6 @@ ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL
|
||||
usleep(unsigned int useconds)
|
||||
{
|
||||
if (SleepEx((DWORD)(useconds / 1000), FALSE) != 0)
|
||||
return -1;
|
||||
return 1000; /* XXX Should get time before and after */
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user