11427 stmfsvc: NULL pointer errors

Review Request #2145 — Created July 11, 2019 and submitted

tsoome
illumos-gate
11427
ba98e6f...
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 stmfsvc.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)
              ^
stmfsvc.c:73:27: note: in expansion of macro 'NULL'
  {NULL, 0, NULL, NULL, 0, NULL, 0, NULL}
                           ^~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'subcommands[2].operand')
 #define NULL ((void *)0)
              ^
stmfsvc.c:73:27: note: in expansion of macro 'NULL'
  {NULL, 0, NULL, NULL, 0, NULL, 0, NULL}
                           ^~~~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
citrus
  1. 
      
  2. usr/src/cmd/stmfsvc/stmfsvc.c (Diff revision 1)
     
     

    {NULL, 0, NULL, NULL, NULL, 0, NULL, NULL}

    Looks right:

    typedef struct _subCommandProps {
            char *name;
            handler_t handler;
            char *optionString;
            char *required;
            char *exclusive;
            int operand;
            char *operandDefinition;
            char *helpText;
            uint8_t reserved[60];
    } subCommandProps_t;
    
  3. 
      
tsoome
citrus
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...