Project

General

Profile

Actions

Bug #11448

closed

xstr: NULL pointer errors

Added by Toomas Soome over 4 years ago. Updated over 4 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:

    xstr.c: In function 'inithash':
    xstr.c:275:44: error: comparison between pointer and integer [-Werror]
       if (fgetNUL(buf, sizeof (buf), mesgread) == NULL)
                                                ^~
    xstr.c: In function 'fgetNUL':
    xstr.c:291:46: error: pointer/integer type mismatch in conditional expression [-Werror]
      return ((feof(file) || ferror(file)) ? NULL : 1);
                                                  ^
    xstr.c:291:46: error: return makes integer from pointer without a cast [-Werror=int-conversion]
      return ((feof(file) || ferror(file)) ? NULL : 1);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 4 years ago

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

git commit a6959a060879676e965529db823ea71db60ac49b

commit  a6959a060879676e965529db823ea71db60ac49b
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-31T06:33:36.000Z

    11448 xstr: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF