Project

General

Profile

Bug #11448

xstr: 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:

    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

History

#1

Updated by Electric Monk 3 months ago

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

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>

Also available in: Atom PDF