Project

General

Profile

Bug #10795

cpr: NULL pointer errors

Added by Toomas Soome 4 months ago. Updated 4 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../../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

History

#1

Updated by Electric Monk 4 months ago

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

git commit b4aa415ef0fccf334b7c434a7b01585969f50a9a

commit  b4aa415ef0fccf334b7c434a7b01585969f50a9a
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-16T04:55:36.000Z

    10795 cpr: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF