10795 cpr: NULL pointer errors

Review Request #1760 - Created April 14, 2019 and submitted

Information
Toomas Soome
illumos-gate
10795
dd8ce05...
Reviewers
general
../../common/cpr/cpr_stat.c: In function 'cpr_stat_cleanup':
../../common/cpr/cpr_stat.c:137:46: error: comparison between pointer and integer [-Werror]
       strcmp(cep->ce_name, "POST CPR DELAY") != NULL) {
                                              ^~
../../common/cpr/cpr_stat.c: In function 'cpr_stat_event_print':
../../common/cpr/cpr_stat.c:187:45: error: comparison between pointer and integer [-Werror]
   if (strcmp(cep->ce_name, "Suspend Total") == NULL ||
                                             ^~
../../common/cpr/cpr_stat.c:188:44: error: comparison between pointer and integer [-Werror]
       strcmp(cep->ce_name, "Resume Total") == NULL ||
                                            ^~
../../common/cpr/cpr_stat.c:189:46: error: comparison between pointer and integer [-Werror]
       strcmp(cep->ce_name, "POST CPR DELAY") == NULL ||
                                              ^~
../../common/cpr/cpr_stat.c:190:43: error: comparison between pointer and integer [-Werror]
       strcmp(cep->ce_name, "WHOLE CYCLE") == NULL)
                                           ^~
../../common/cpr/cpr_stat.c: In function 'cpr_find_event':
../../common/cpr/cpr_stat.c:234:34: error: comparison between pointer and integer [-Werror]
   if (strcmp(name, cep->ce_name) == NULL)
                                  ^~
../../common/cpr/cpr_stat.c:239:10: error: comparison between pointer and integer [-Werror]
  if (new == NULL)
          ^~
cc1: all warnings being treated as errors

  
Andrew Stormont
Sebastian Wiedenroth
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...