11448 xstr: NULL pointer errors

Review Request #2166 - Created July 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
11448
1f849f1...
Reviewers
general
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

  
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...