11432 stat: NULL pointer errors

Review Request #2150 - Created July 11, 2019 and submitted - Latest diff uploaded

Information
Toomas Soome
illumos-gate
11432
535f320...
Reviewers
general
mpstat.c: In function 'main':
mpstat.c:113:17: error: comparison between pointer and integer [-Werror]
     if (*endptr != NULL)
                 ^~
mpstat.c:146:15: error: comparison between pointer and integer [-Werror]
   if (*endptr != NULL)
               ^~
mpstat.c:152:16: error: comparison between pointer and integer [-Werror]
    if (*endptr != NULL || iter < 0)
                ^~
mpstat.c: In function 'agg_vm':
mpstat.c:317:20: error: comparison between pointer and integer [-Werror]
  if (p->ps_nr_cpus == NULL)
                    ^~
mpstat.c: In function 'agg_sys':
mpstat.c:337:20: error: comparison between pointer and integer [-Werror]
  if (p->ps_nr_cpus == NULL)
                    ^~

/code/illumos-gate/usr/src/cmd/stat/common/dsr.c: In function 'cur_special':
/code/illumos-gate/usr/src/cmd/stat/common/dsr.c:511:12: error: comparison between pointer and integer [-Werror]
    if (*cp == NULL)
            ^~
/code/illumos-gate/usr/src/cmd/stat/common/dsr.c:523:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *cp = NULL;
        ^

/code/illumos-gate/usr/src/cmd/stat/common/acquire_iodevs.c: In function 'iodev_match':
/code/illumos-gate/usr/src/cmd/stat/common/acquire_iodevs.c:358:22: error: comparison between pointer and integer [-Werror]
  if (df->if_nr_names == NULL)
                      ^~
/code/illumos-gate/usr/src/cmd/stat/common/acquire_iodevs.c: In function 'choose_iodevs':
/code/illumos-gate/usr/src/cmd/stat/common/acquire_iodevs.c:454:23: error: comparison between pointer and integer [-Werror]
  if ((df->if_nr_names == NULL) || (nr_iodevs != nr_iodevs_orig)) {
                       ^~
cc1: all warnings being treated as errors

  
Loading...