Project

General

Profile

Bug #11448

xstr: NULL pointer errors

Added by Toomas Soome 4 days ago.

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

90%

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

Also available in: Atom PDF