11351 iscsiadm: NULL pointer errors

Review Request #2087 - Created July 6, 2019 and submitted

Information
Toomas Soome
illumos-gate
11351
543926b...
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 iscsiadm_main.c:25:
/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)
              ^
iscsiadm_main.c:354:18: note: in expansion of macro 'NULL'
  {0, 0, 0, 0, 0, NULL}
                  ^~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'objectRules[7].opCmd.multOpCmd')
 #define NULL ((void *)0)
              ^
iscsiadm_main.c:354:18: note: in expansion of macro 'NULL'
  {0, 0, 0, 0, 0, NULL}
                  ^~~~
iscsiadm_main.c: In function 'getTargetAddress':
iscsiadm_main.c:655:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *colPos = NULL;
            ^
iscsiadm_main.c:658:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *colPos = NULL;
           ^
iscsiadm_main.c:675:15: error: comparison between pointer and integer [-Werror]
   if (*colPos == NULL) {
               ^~
iscsiadm_main.c: In function 'getSecret':
iscsiadm_main.c:1523:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *secret = NULL;
           ^
iscsiadm_main.c:1531:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *secret = NULL;
           ^
iscsiadm_main.c:1539:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *secret = NULL;
           ^
iscsiadm_main.c:1550:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *secret = NULL;
           ^
iscsiadm_main.c:1557:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *secret = NULL;
           ^
iscsiadm_main.c: In function 'modifyNodeAuthMethod':
iscsiadm_main.c:3455:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *commaPos = NULL;
             ^
iscsiadm_main.c: In function 'modifyTargetAuthMethod':
iscsiadm_main.c:3510:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *commaPos = NULL;
             ^
iscsiadm_main.c: In function 'removeTargetParam':
iscsiadm_main.c:4701:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *commaPos = NULL;
              ^
iscsiadm_main.c: In function 'parseAddress':
iscsiadm_main.c:5065:22: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *close_bracket_pos = NULL;
                      ^
iscsiadm_main.c:5073:27: error: comparison between pointer and integer [-Werror]
    if (*close_bracket_pos != NULL) {
                           ^~
iscsiadm_main.c:5111:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    *colon_pos = (char)NULL;
                 ^
iscsiadm_main.c:5117:19: error: comparison between pointer and integer [-Werror]
    if (*colon_pos != NULL) {
                   ^~
iscsiadm_main.c: In function 'iSCSINameStringProfileCheck':
iscsiadm_main.c:5171:27: error: comparison between pointer and integer [-Werror]
  for (tmp = mb_name; *tmp != NULL; tmp++) {
                           ^~
iscsiadm_main.c: In function 'parseTarget':
iscsiadm_main.c:5353:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *commaPos = NULL;
             ^
iscsiadm_main.c:5363:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *commaPos2 = NULL;
               ^
cc1: all warnings being treated as errors

  
Garrett D'Amore
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...