11299 csplit: NULL pointer errors

Review Request #2045 - Created July 1, 2019 and submitted

Information
Toomas Soome
illumos-gate
11299
d820e3a...
Reviewers
general
csplit.c: In function 'main':
csplit.c:113:29: error: comparison between pointer and integer [-Werror]
     for (ptr = optarg; *ptr != NULL; ptr++)
                             ^~
csplit.c: In function 'asc_to_ll':
csplit.c:224:14: error: comparison between pointer and integer [-Werror]
  for (; *str != NULL; str++)
              ^~
csplit.c: In function 'getfile':
csplit.c:361:28: error: comparison between pointer and integer [-Werror]
    for (fptr = file; *fptr != NULL; fptr++)
                            ^~
csplit.c: In function 'num_arg':
csplit.c:457:12: error: comparison between pointer and integer [-Werror]
   if (*arg == NULL)
            ^~
csplit.c:466:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  *ptr = NULL;
       ^
csplit.c: In function 're_arg':
csplit.c:505:12: error: comparison between pointer and integer [-Werror]
   if (*ptr == NULL)
            ^~
csplit.c:519:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  *ptr = NULL;
       ^
cc1: all warnings being treated as errors

  
John Levon
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...