11111 lex: NULL pointer errors

Review Request #1896 — Created June 1, 2019 and submitted

tsoome
illumos-gate
11111
2770955...
general
../common/sub1.c: In function 'cpycom':
../common/sub1.c:493:10: error: comparison between pointer and integer [-Werror]
   if (*t != NULL)
          ^~
cc1: all warnings being treated as errors


rejohnst
  1. I realize it won't make a functional difference, but should it be comparing against '\0' instead of 0?

    1. I do not think so. CHR is wchar_t (might still be byte sized though), and secondly, '\0' is also 0, but by using 0, we will not break case where wchar_t is more than 8-bit int.

    2. Ok, that makese sense. Thanks.

  2. 
      
tsoome
rejohnst
  1. Ship It!
  2. 
      
tsoome
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...