11400 nscd: NULL pointer errors

Review Request #2122 - Created July 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
11400
c5e7e6d...
Reviewers
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                 from nscd_frontend.c:28:
nscd_frontend.c: In function '_nscd_setup_server':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_frontend.c:1253:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL,
                       ^~~~
In file included from nscd_switch.h:34:0,
                 from nscd_frontend.c:48:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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/stdlib_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                 from nscd_frontend.c:28:
nscd_frontend.c: In function '_nscd_setup_child_server':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_frontend.c:1319:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL,
                       ^~~~
In file included from nscd_switch.h:34:0,
                 from nscd_frontend.c:48:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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 nscd_selfcred.c:28:
nscd_selfcred.c: In function 'init_user_proc_monitor':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_selfcred.c:1524:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, check_user_process,
                       ^~~~
In file included from nscd_selfcred.c:31:0:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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/stdlib_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                 from nscd_smfmonitor.c:28:
nscd_smfmonitor.c: In function '_nscd_init_smf_monitor':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_smfmonitor.c:149:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, set_smf_state,
                       ^~~~
In file included from nscd_switch.h:34:0,
                 from nscd_smfmonitor.c:31:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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/stdlib_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                 from nscd_getentctx.c:30:
nscd_getentctx.c: In function '_nscd_init_getent_ctx_monitor':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_getentctx.c:770:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, reclaim_getent_ctx,
                       ^~~~
In file included from nscd_switch.h:34:0,
                 from nscd_getentctx.c:38:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~

nscd_dbimpl.c: In function 'calc_hash':
nscd_dbimpl.c:95:14: error: comparison between pointer and integer [-Werror]
  while (*str != NULL) {
              ^~

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 nscd_config.c:27:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_cfgdef.h:1004:41: note: in expansion of macro 'NULL'
   {-1, NULL}, -1, NSCD_CFG_SFLAG_GROUP, NULL, \
                                         ^~~~
nscd_cfgdef.h:1373:2: note: in expansion of macro 'NSCD_CFG_SGROUP_DESC_NULL'
  NSCD_CFG_SGROUP_DESC_NULL
  ^~~~~~~~~~~~~~~~~~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for '_nscd_cfg_stat_desc[36].gi.num_param')
 #define NULL ((void *)0)
              ^
nscd_cfgdef.h:1004:41: note: in expansion of macro 'NULL'
   {-1, NULL}, -1, NSCD_CFG_SFLAG_GROUP, NULL, \
                                         ^~~~
nscd_cfgdef.h:1373:2: note: in expansion of macro 'NSCD_CFG_SGROUP_DESC_NULL'
  NSCD_CFG_SGROUP_DESC_NULL
  ^~~~~~~~~~~~~~~~~~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_cfgdef.h:1007:3: note: in expansion of macro 'NULL'
   NULL \
   ^~~~
nscd_cfgdef.h:1373:2: note: in expansion of macro 'NSCD_CFG_SGROUP_DESC_NULL'
  NSCD_CFG_SGROUP_DESC_NULL
  ^~~~~~~~~~~~~~~~~~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for '_nscd_cfg_stat_desc[36].g_index')
 #define NULL ((void *)0)
              ^
nscd_cfgdef.h:1007:3: note: in expansion of macro 'NULL'
   NULL \
   ^~~~
nscd_cfgdef.h:1373:2: note: in expansion of macro 'NSCD_CFG_SGROUP_DESC_NULL'
  NSCD_CFG_SGROUP_DESC_NULL
  ^~~~~~~~~~~~~~~~~~~~~~~~~
nscd_config.c: In function '_nscd_cfg_init':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'rwlock_init' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_config.c:1273:45: note: in expansion of macro 'NULL'
  (void) rwlock_init(nscd_cfg_global_rwlock, NULL, NULL);
                                             ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/nss_common.h:39:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/nss_dbdefs.h:48,
                 from nscd_db.h:35,
                 from nscd_config.c:34:
/code/illumos-gate/proto/root_i386/usr/include/synch.h:115:5: note: expected 'int' but argument is of type 'void *'
 int rwlock_init(rwlock_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 nscd_config.c:27:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'rwlock_init' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_config.c:1294:7: note: in expansion of macro 'NULL'
       NULL, NULL);
       ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/nss_common.h:39:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/nss_dbdefs.h:48,
                 from nscd_db.h:35,
                 from nscd_config.c:34:
/code/illumos-gate/proto/root_i386/usr/include/synch.h:115:5: note: expected 'int' but argument is of type 'void *'
 int rwlock_init(rwlock_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 nscd_config.c:27:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'rwlock_init' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
nscd_config.c:1385:48: note: in expansion of macro 'NULL'
  (void) rwlock_init(nscd_cfg_nsw_alldb_rwlock, NULL, NULL);
                                                ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/nss_common.h:39:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/nss_dbdefs.h:48,
                 from nscd_db.h:35,
                 from nscd_config.c:34:
/code/illumos-gate/proto/root_i386/usr/include/synch.h:115:5: note: expected 'int' but argument is of type 'void *'
 int rwlock_init(rwlock_t *, int, void *);
     ^~~~~~~~~~~
nscd_config.c: In function '_nscd_cfg_copy_group_data_out':
nscd_config.c:1836:13: error: comparison between pointer and integer [-Werror]
    if (dlen == NULL)
             ^~
nscd_config.c: In function '_nscd_cfg_copy_group_data_merge':
nscd_config.c:1906:18: error: comparison between pointer and integer [-Werror]
  if (param_index != NULL && pdata == NULL) {
                  ^~
nscd_config.c: In function '_nscd_cfg_str_to_data':
nscd_config.c:2375:13: error: comparison between pointer and integer [-Werror]
   if (errno != NULL) {
             ^~
nscd_config.c:2396:13: error: comparison between pointer and integer [-Werror]
   if (errno != NULL) {
             ^~

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 cache.c:33:
cache.c: In function 'start_threads':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
cache.c:1137:24: note: in expansion of macro 'NULL'
   if (thr_create(NULL, NULL, (void *(*)(void *))revalidate,
                        ^~~~
In file included from cache.h:38:0,
                 from cache.c:52:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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/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 cache.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
cache.c:1152:24: note: in expansion of macro 'NULL'
   if (thr_create(NULL, NULL, (void *(*)(void *))reaper,
                        ^~~~
In file included from cache.h:38:0,
                 from cache.c:52:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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/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 cache.c:33:
cache.c: In function 'launch_update':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
cache.c:1951:28: note: in expansion of macro 'NULL'
  errnum = thr_create(NULL, NULL, (void *(*)(void*))do_update,
                            ^~~~
In file included from cache.h:38:0,
                 from cache.c:52:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka 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

  

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Andy Fiddaman
Andy Fiddaman
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...