diff --git a/osal/win32/osal.c b/osal/win32/osal.c index d744fea7..d9572cad 100644 --- a/osal/win32/osal.c +++ b/osal/win32/osal.c @@ -12,9 +12,10 @@ static double qpc2usec; #define USECS_PER_SEC 1000000 -int osal_getrelativetime(struct timeval *tv, struct timezone *tz) +static int osal_getrelativetime(struct timeval *tv, struct timezone *tz) { int64_t wintime, usecs; + (void)tz; if(!sysfrequency) { timeBeginPeriod(1); @@ -33,7 +34,7 @@ int osal_gettimeofday(struct timeval *tv, struct timezone *tz) { FILETIME system_time; int64 system_time64, usecs; - + (void)tz; /* The offset variable is required to switch from Windows epoch (January 1, 1601) to * Unix epoch (January 1, 1970). Number of days between both epochs: 134.774 * @@ -130,9 +131,9 @@ void osal_free(void *ptr) free(ptr); } -int osal_thread_create(void **thandle, int stacksize, void *func, void *param) +int osal_thread_create(void *thandle, int stacksize, void *func, void *param) { - *thandle = CreateThread(NULL, stacksize, func, param, 0, NULL); + *(OSAL_THREAD_HANDLE*)thandle = CreateThread(NULL, stacksize, func, param, 0, NULL); if(!thandle) { return 0; @@ -140,13 +141,13 @@ int osal_thread_create(void **thandle, int stacksize, void *func, void *param) return 1; } -int osal_thread_create_rt(void **thandle, int stacksize, void *func, void *param) +int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param) { int ret; ret = osal_thread_create(thandle, stacksize, func, param); if (ret) { - ret = SetThreadPriority(*thandle, THREAD_PRIORITY_TIME_CRITICAL); + ret = SetThreadPriority(thandle, THREAD_PRIORITY_TIME_CRITICAL); } return ret; } diff --git a/osal/win32/osal_win32.h b/osal/win32/osal_win32.h index b1c87ffc..37a187ad 100644 --- a/osal/win32/osal_win32.h +++ b/osal/win32/osal_win32.h @@ -29,6 +29,8 @@ } \ } while (0) +struct timezone; +// currently the tz parameter is ignored in the win32 implmentation. int osal_gettimeofday (struct timeval *tv, struct timezone *tz); #endif diff --git a/oshw/win32/nicdrv.c b/oshw/win32/nicdrv.c index 9657f31c..96d2f0fb 100644 --- a/oshw/win32/nicdrv.c +++ b/oshw/win32/nicdrv.c @@ -89,10 +89,9 @@ static void ecx_clear_rxbufstat(int *rxbufstat) */ int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary) { - int i, rval; + int i; pcap_t **psock; - rval = 0; if (secondary) { /* secondary port struct available? */ diff --git a/oshw/win32/oshw.c b/oshw/win32/oshw.c index c217baa9..247887ec 100644 --- a/oshw/win32/oshw.c +++ b/oshw/win32/oshw.c @@ -35,7 +35,6 @@ uint16 oshw_ntohs (uint16 network) ec_adaptert * oshw_find_adapters (void) { int i = 0; - int ret = 0; pcap_if_t *alldevs; pcap_if_t *d; ec_adaptert * adapter;