Actions
Bug #11381
closedldapcachemgr: NULL pointer errors
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
Build errors with NULL pointer:
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0, from /code/illumos-gate/proto/root_i386/usr/include/time.h:40, from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462, from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53, from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640, from /code/illumos-gate/proto/root_i386/usr/include/memory.h:31, from cachemgr_getldap.c:29: cachemgr_getldap.c: In function 'getldap_serverInfo_op': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'cond_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ cachemgr_getldap.c:1822:32: note: in expansion of macro 'NULL' (void) cond_init(&info_cond, NULL, NULL); ^~~~ In file included from cachemgr_getldap.c:41:0: /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/time_iso.h:49:0, from /code/illumos-gate/proto/root_i386/usr/include/time.h:40, from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462, from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53, from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640, from /code/illumos-gate/proto/root_i386/usr/include/memory.h:31, from cachemgr_getldap.c:29: cachemgr_getldap.c: In function 'getldap_get_cacheStat': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: incompatible type for argument 2 of 'getldap_cache_op' #define NULL ((void *)0) ^ cachemgr_getldap.c:2174:44: note: in expansion of macro 'NULL' (void) getldap_cache_op(CACHE_OP_GETSTAT, NULL, NULL, &coutstr); ^~~~ cachemgr_getldap.c:299:1: note: expected 'cache_type_t {aka enum <anonymous>}' but argument is of type 'void *' getldap_cache_op(cache_op_t op, cache_type_t type, ^~~~~~~~~~~~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0, from /code/illumos-gate/proto/root_i386/usr/include/time.h:40, from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462, from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53, from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640, from /code/illumos-gate/proto/root_i386/usr/include/memory.h:31, from cachemgr_getldap.c:29: cachemgr_getldap.c: In function 'getldap_refresh': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'cond_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ cachemgr_getldap.c:2586:11: note: in expansion of macro 'NULL' NULL, NULL); ^~~~ In file included from cachemgr_getldap.c:41:0: /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/time_iso.h:49:0, from /code/illumos-gate/proto/root_i386/usr/include/time.h:40, from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462, from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53, from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640, from /code/illumos-gate/proto/root_i386/usr/include/memory.h:31, from cachemgr_getldap.c:29: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'cond_init' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ cachemgr_getldap.c:2644:28: note: in expansion of macro 'NULL' (void) cond_init(&cond, NULL, NULL); ^~~~ In file included from cachemgr_getldap.c:41:0: /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 *); ^~~~~~~~~ cc1: all warnings being treated as errors
Updated by Electric Monk almost 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 5fe539ba6982d2eafbe355b9c775a0779e3407e5
commit 5fe539ba6982d2eafbe355b9c775a0779e3407e5 Author: Toomas Soome <tsoome@me.com> Date: 2019-08-01T15:44:27.000Z 11381 ldapcachemgr: NULL pointer errors Reviewed by: Peter Tribble <peter.tribble@gmail.com> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions