Project

General

Profile

Bug #11338

format: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    checkdev.c: In function 'checkdevinuse':
    checkdev.c:356:24: error: comparison between pointer and integer [-Werror]
      for (i = 0; slices[i] != NULL; i++) {
                            ^~

    ix_altsctr.c: In function 'init_altsctr':
    ix_altsctr.c:274:33: error: comparison between pointer and integer [-Werror]
      if (ap->ap_tblp->alts_map_base == NULL) {
                                     ^~
    ix_altsctr.c: In function 'gen_alts_ent':
    ix_altsctr.c:499:33: error: comparison between pointer and integer [-Werror]
      if (ap->ap_tblp->alts_ent_base == NULL) {
                                     ^~
    ix_altsctr.c: In function 'assign_altsctr':
    ix_altsctr.c:530:19: error: comparison between pointer and integer [-Werror]
          if (alts_ind == NULL) {
                       ^~
    ix_altsctr.c: In function 'altsmap_alloc':
    ix_altsctr.c:634:9: error: return makes integer from pointer without a cast [-Werror=int-conversion]
      return (NULL);
             ^

    io.c: In function 'execute_shell':
    io.c:2440:9: error: comparison between pointer and integer [-Werror]
      if (*s == NULL) {
             ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 3 months ago

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

git commit 4d7452f8473ff4636be68c3aa2ec185d6aa00315

commit  4d7452f8473ff4636be68c3aa2ec185d6aa00315
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-11T15:16:35.000Z

    11338 format: NULL pointer errors
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF