11381 ldapcachemgr: NULL pointer errors

Review Request #2104 - Created July 10, 2019 and submitted

Information
Toomas Soome
illumos-gate
11381
1ac5b33...
Reviewers
general
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

  
Peter Tribble
Andrew Stormont
Toomas Soome
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...