11407 powertop: NULL pointer errors

Review Request #2129 - Created July 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
11407
1433a6a...
Reviewers
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/unistd.h:40:0,
                 from ../common/suggestions.c:40:
../common/suggestions.c: In function 'pt_sugg_as_root':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'pt_sugg_add' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/suggestions.c:271:53: note: in expansion of macro 'NULL'
      " for reducing system power consumption",  40, NULL, NULL,
                                                     ^~~~
../common/suggestions.c:66:1: note: expected 'char' but argument is of type 'void *'
 pt_sugg_add(char *text, int weight, char key, char *sb_msg, sugg_func_t *func)
 ^~~~~~~~~~~

../common/events.c: In function 'pt_events_walk':
../common/events.c:110:21: error: comparison between pointer and integer [-Werror]
   if (offender_addr != NULL && dtrace_lookup_by_addr(dtp,
                     ^~
../common/events.c:154:21: error: comparison between pointer and integer [-Werror]
   if (offender_addr != NULL && dtrace_lookup_by_addr(dtp,
                     ^~
../common/events.c:193:21: error: comparison between pointer and integer [-Werror]
   if (offender_addr != NULL && dtrace_lookup_by_addr(dtp,
                     ^~

../common/powertop.c: In function 'main':
../common/powertop.c:150:35: error: comparison between pointer and integer [-Werror]
    if (dump_count <= 0 || *endptr != NULL) {
                                   ^~
../common/powertop.c:166:16: error: comparison between pointer and integer [-Werror]
    if (*endptr != NULL || interval < 1 ||
                ^~
cc1: all warnings being treated as errors

  
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...