Project

General

Profile

Actions

Bug #11288

closed

bootadm: NULL pointer errors

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with NULL pointer:

    bootadm_hyper.c: In function 'append_str':
    bootadm_hyper.c:75:31: error: comparison between pointer and integer [-Werror]
      if ((orig == NULL) || (*orig == NULL)) {
                                   ^~
    bootadm_hyper.c: In function 'get_token':
    bootadm_hyper.c:150:29: error: comparison between pointer and integer [-Werror]
      if ((str == NULL) || (*str == NULL))
                                 ^~
    bootadm_hyper.c:157:17: error: comparison between pointer and integer [-Werror]
        while ((*str != NULL) && (*str != quote))
                     ^~
    bootadm_hyper.c:161:15: error: comparison between pointer and integer [-Werror]
        if (*str++ == NULL)
                   ^~
    bootadm_hyper.c:166:26: error: comparison between pointer and integer [-Werror]
       for (dp = delim; ((*dp != NULL) && (*dp != *str)); dp++)
                              ^~
    bootadm_hyper.c:169:11: error: comparison between pointer and integer [-Werror]
       if (*dp != NULL) {
               ^~
    bootadm_hyper.c:186:18: error: comparison between pointer and integer [-Werror]
      } while (*str++ != NULL);
                      ^~
    bootadm_hyper.c: In function 'cvt_metal_option':
    bootadm_hyper.c:341:15: error: comparison between pointer and integer [-Werror]
      if (*++value == NULL)
                   ^~
    bootadm_hyper.c: In function 'cvt_hyper_option':
    bootadm_hyper.c:398:15: error: comparison between pointer and integer [-Werror]
      if (*++value == NULL)
                   ^~
    bootadm_hyper.c: In function 'parse_bootenvrc':
    bootadm_hyper.c:684:35: error: comparison between pointer and integer [-Werror]
       if (strncmp(line, "setprop", 7) != NULL)
                                       ^~
    bootadm_hyper.c: In function 'cvt_to_hyper':
    bootadm_hyper.c:916:43: error: comparison between pointer and integer [-Werror]
      if ((extra_args != NULL) && (*extra_args != NULL)) {
                                               ^~
    bootadm_hyper.c:928:19: error: comparison between pointer and integer [-Werror]
       if (*kern_bargs != NULL)
                       ^~
    bootadm_hyper.c:1006:17: error: comparison between pointer and integer [-Werror]
           ((*osroot == NULL) ? "/" : osroot));
                     ^~

    bootadm.c: In function 'list_setting':
    bootadm.c:1032:13: error: comparison between pointer and integer [-Werror]
      if (*which != NULL) {
                 ^~
    bootadm.c:1038:13: error: comparison between pointer and integer [-Werror]
       while (*p != NULL)
                 ^~
    bootadm.c:1059:20: error: comparison between pointer and integer [-Werror]
      found = (*setting == NULL);
                        ^~
    bootadm.c:1062:17: error: comparison between pointer and integer [-Werror]
       if ((*setting == NULL) && (lp->flags != BAM_COMMENT))
                     ^~
    cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF