Bug #11126
libslp: NULL pointer errors
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
NULL pointer errors:
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/SLPOpen.c:29: ../clib/SLPOpen.c: In function 'SLPOpen': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'mutex_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/SLPOpen.c:53:41: note: in expansion of macro 'NULL' (void) mutex_init(&(hp->outcall_lock), NULL, NULL); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/thread.h:43:0, from ../clib/SLPOpen.c:31: /code/illumos-gate/proto/root_i386/usr/include/synch.h:109:5: note: expected 'int' but argument is of type 'void *' int mutex_init(mutex_t *, int, void *); ^~~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/SLPOpen.c:29: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'cond_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/SLPOpen.c:54:38: note: in expansion of macro 'NULL' (void) cond_init(&(hp->outcall_cv), NULL, NULL); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/thread.h:43:0, from ../clib/SLPOpen.c:31: /code/illumos-gate/proto/root_i386/usr/include/synch.h:102:5: note: expected 'int' but argument is of type 'void *' int cond_init(cond_t *, int, void *); ^~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/slp_queue.c:45: ../clib/slp_queue.c: In function 'slp_new_queue': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'cond_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/slp_queue.c:96:25: note: in expansion of macro 'NULL' (void) cond_init(wait, NULL, NULL); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/thread.h:43:0, from ../clib/slp_queue.c:47: /code/illumos-gate/proto/root_i386/usr/include/synch.h:102:5: note: expected 'int' but argument is of type 'void *' int cond_init(cond_t *, int, void *); ^~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/slp_da_cache.c:55: ../clib/slp_da_cache.c: In function 'start_cache_thr': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/slp_da_cache.c:229:6: note: in expansion of macro 'NULL' 0, NULL, (void *(*)(void *)) cache_thr, ^~~~ In file included from ../clib/slp_da_cache.c:57:0: /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka long unsigned int}' but argument is of type 'void *' extern int thr_create(void *, size_t, void *(*)(void *), void *, long, ^~~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/slp_ipc.c:29: ../clib/slp_ipc.c: In function 'open_ipc': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/slp_ipc.c:121:7: note: in expansion of macro 'NULL' 0, NULL, ^~~~ In file included from ../clib/slp_ipc.c:38:0: /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka long unsigned int}' but argument is of type 'void *' extern int thr_create(void *, size_t, void *(*)(void *), void *, long, ^~~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/SLPReg.c:61: ../clib/SLPReg.c: In function 'start_reg_thr': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/SLPReg.c:568:6: note: in expansion of macro 'NULL' 0, NULL, (void *(*)(void *)) reg_thread, ^~~~ In file included from ../clib/SLPReg.c:63:0: /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka long unsigned int}' but argument is of type 'void *' extern int thr_create(void *, size_t, void *(*)(void *), void *, long, ^~~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/slp_net.c:48: ../clib/slp_net.c: In function 'slp_uc_tcp_send': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'mutex_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/slp_net.c:139:35: note: in expansion of macro 'NULL' (void) mutex_init(hp->tcp_lock, NULL, NULL); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/thread.h:43:0, from ../clib/slp-internal.h:36, from ../clib/slp_net.c:58: /code/illumos-gate/proto/root_i386/usr/include/synch.h:109:5: note: expected 'int' but argument is of type 'void *' int mutex_init(mutex_t *, int, void *); ^~~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/slp_net.c:48: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'cond_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/slp_net.c:147:34: note: in expansion of macro 'NULL' (void) cond_init(hp->tcp_wait, NULL, NULL); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/thread.h:43:0, from ../clib/slp-internal.h:36, from ../clib/slp_net.c:58: /code/illumos-gate/proto/root_i386/usr/include/synch.h:102:5: note: expected 'int' but argument is of type 'void *' int cond_init(cond_t *, int, void *); ^~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../clib/slp_net.c:48: ../clib/slp_net.c: In function 'start_tcp_thr': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../clib/slp_net.c:424:28: note: in expansion of macro 'NULL' if ((terr = thr_create(0, NULL, (void *(*)(void *)) tcp_thread, ^~~~ In file included from ../clib/slp-internal.h:36:0, from ../clib/slp_net.c:58: /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka long unsigned int}' but argument is of type 'void *' extern int thr_create(void *, size_t, void *(*)(void *), void *, long, ^~~~~~~~~~ cc1: all warnings being treated as errors