Project

General

Profile

Actions

Bug #10770

closed

idm: NULL pointer errors

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-04-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

NULL pointer errors:

    ../../../common/iscsi/base64.c: In function 'iscsi_base64_str_to_binary':
    ../../../common/iscsi/base64.c:135:31: error: comparison between pointer and integer [-Werror]
      while (((curchr = *(iptr++)) != NULL) &&
                                   ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/conf.h:37,
                     from ../../common/io/idm/idm_impl.c:26:
    ../../common/io/idm/idm_impl.c: In function 'idm_tgt_conn_finish':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_impl.c:517:48: note: in expansion of macro 'NULL'
      rc = idm_notify_client(ic, CN_CONNECT_ACCEPT, NULL);
                                                    ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_impl.c:38:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/conf.h:37,
                     from ../../common/io/idm/idm_impl.c:26:
    ../../common/io/idm/idm_impl.c: In function 'idm_wd_thread':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_impl.c:1173:43: note: in expansion of macro 'NULL'
         idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
                                               ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_impl.c:38:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_login_timeout':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:497:39: note: in expansion of macro 'NULL'
      idm_conn_event(ic, CE_LOGIN_TIMEOUT, NULL);
                                           ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_state_s3_xpt_up':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:515:47: note: in expansion of macro 'NULL'
       (void) idm_notify_client(ic, CN_LOGIN_FAIL, NULL);
                                                   ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:533:47: note: in expansion of macro 'NULL'
       (void) idm_notify_client(ic, CN_LOGIN_FAIL, NULL);
                                                   ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_state_s4_in_login':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:572:47: note: in expansion of macro 'NULL'
       (void) idm_notify_client(ic, CN_LOGIN_FAIL, NULL);
                                                   ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:606:47: note: in expansion of macro 'NULL'
       (void) idm_notify_client(ic, CN_LOGIN_FAIL, NULL);
                                                   ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_logout_req_timeout':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:834:40: note: in expansion of macro 'NULL'
      idm_conn_event(ic, CE_LOGOUT_TIMEOUT, NULL);
                                            ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_cleanup_timeout':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:915:41: note: in expansion of macro 'NULL'
      idm_conn_event(ic, CE_CLEANUP_TIMEOUT, NULL);
                                             ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_update_state':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1169:40: note: in expansion of macro 'NULL'
        idm_conn_event(ic, CE_CONNECT_FAIL, NULL);
                                            ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1171:43: note: in expansion of macro 'NULL'
        idm_conn_event(ic, CE_CONNECT_SUCCESS, NULL);
                                               ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1184:43: note: in expansion of macro 'NULL'
         idm_conn_event(ic, CE_CONNECT_REJECT, NULL);
                                               ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1187:41: note: in expansion of macro 'NULL'
         idm_conn_event(ic, CE_CONNECT_FAIL, NULL);
                                             ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1202:53: note: in expansion of macro 'NULL'
        (void) idm_notify_client(ic, CN_READY_FOR_LOGIN, NULL);
                                                         ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1218:42: note: in expansion of macro 'NULL'
        idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
                                              ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1224:35: note: in expansion of macro 'NULL'
            CE_CONN_REINSTATE_SUCCESS, NULL);
                                       ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1281:9: note: in expansion of macro 'NULL'
             NULL);
             ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1323:45: note: in expansion of macro 'NULL'
        idm_conn_event(ic, CE_ENABLE_DM_SUCCESS, NULL);
                                                 ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1325:42: note: in expansion of macro 'NULL'
        idm_conn_event(ic, CE_ENABLE_DM_FAIL, NULL);
                                              ^~~~
    ../../common/io/idm/idm_conn_sm.c:179:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(idm_conn_t *ic, idm_conn_event_t event, uintptr_t event_info)
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_conn_unref':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1352:52: note: in expansion of macro 'NULL'
       (void) idm_notify_client(ic, CN_CONNECT_DESTROY, NULL);
                                                        ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1356:52: note: in expansion of macro 'NULL'
       (void) idm_notify_client(ic, CN_CONNECT_DESTROY, NULL);
                                                        ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_conn_sm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:277:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(struct idm_conn_s *ic, idm_client_notify_t cn,
     ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm_conn_sm.c:28:
    ../../common/io/idm/idm_conn_sm.c: In function 'idm_ffp_enable':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_notify_client' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_conn_sm.c:1612:45: note: in expansion of macro 'NULL'
      rc = idm_notify_client(ic, CN_FFP_ENABLED, NULL);
                                                 ^~~~
    ../../common/io/idm/idm_conn_sm.c:1581:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_notify_client(idm_conn_t *ic, idm_client_notify_t cn, uintptr_t data)
     ^~~~~~~~~~~~~~~~~

    ../../common/io/idm/idm.c: In function 'idm_ini_conn_destroy':
    ../../common/io/idm/idm.c:259:48: error: comparison between pointer and integer [-Werror]
          &idm_ini_conn_destroy_task, ic, TQ_SLEEP) == NULL) {
                                                    ^~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm.c:25:
    ../../common/io/idm/idm.c: In function 'idm_ini_conn_connect':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm.c:296:37: note: in expansion of macro 'NULL'
      idm_conn_event(ic, CE_CONNECT_REQ, NULL);
                                         ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm.c:25:
    ../../common/io/idm/idm.c: In function 'idm_ini_conn_disconnect':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm.c:335:40: note: in expansion of macro 'NULL'
      idm_conn_event(ic, CE_TRANSPORT_FAIL, NULL);
                                            ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../common/io/idm/idm.c:25:
    ../../common/io/idm/idm.c: In function 'idm_ini_conn_disconnect_sync':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event_locked' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm.c:354:48: note: in expansion of macro 'NULL'
       idm_conn_event_locked(ic, CE_TRANSPORT_FAIL, NULL, CT_NONE);
                                                    ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm.c:39:
    ../../common/sys/idm/idm_conn_sm.h:287:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event_locked(struct idm_conn_s *ic, idm_conn_event_t event,
     ^~~~~~~~~~~~~~~~~~~~~
    ../../common/io/idm/idm.c: In function 'idm_refcnt_rele':
    ../../common/io/idm/idm.c:2183:50: error: comparison between pointer and integer [-Werror]
            &idm_refcnt_unref_task, refcnt, TQ_SLEEP) == NULL) {
                                                      ^~
    ../../common/io/idm/idm.c: In function 'idm_refcnt_rele_and_destroy':
    ../../common/io/idm/idm.c:2211:49: error: comparison between pointer and integer [-Werror]
           &idm_refcnt_unref_task, refcnt, TQ_SLEEP) == NULL) {
                                                     ^~
    ../../common/io/idm/idm.c: In function 'idm_refcnt_async_wait_ref':
    ../../common/io/idm/idm.c:2244:49: error: comparison between pointer and integer [-Werror]
           &idm_refcnt_unref_task, refcnt, TQ_SLEEP) == NULL) {
                                                     ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/conf.h:37,
                     from ../../common/io/idm/idm_so.c:30:
    ../../common/io/idm/idm_so.c: In function 'idm_so_svc_port_watcher':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_so.c:1389:41: note: in expansion of macro 'NULL'
       idm_conn_event(ic, CE_CONNECT_ACCEPT, NULL);
                                             ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_so.c:55:
    ../../common/sys/idm/idm_conn_sm.h:284:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
     ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/conf.h:37,
                     from ../../common/io/idm/idm_so.c:30:
    ../../common/io/idm/idm_so.c: In function 'idm_so_send_rtt_data':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'idm_conn_event_locked' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/idm/idm_so.c:2621:8: note: in expansion of macro 'NULL'
            NULL, CT_NONE);
            ^~~~
    In file included from ../../common/sys/idm/idm.h:283:0,
                     from ../../common/io/idm/idm_so.c:55:
    ../../common/sys/idm/idm_conn_sm.h:287:1: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     idm_conn_event_locked(struct idm_conn_s *ic, idm_conn_event_t event,
     ^~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 8e718be9d8b2bb15811a2dc0b61cbb5cc5fa3070

commit  8e718be9d8b2bb15811a2dc0b61cbb5cc5fa3070
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-24T12:54:23.000Z

    10770 idm: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF