10305 print: NULL pointer errors

Review Request #1398 - Created Jan. 27, 2019 and submitted

Information
Toomas Soome
illumos-gate
10305
0ba5663...
Reviewers
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                 from in.lpd.c:30:
in.lpd.c: In function 'parse_cf':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
in.lpd.c:133:18: note: in expansion of macro 'NULL'
  char previous = NULL;
                  ^~~~
in.lpd.c: In function 'berkeley_receive_files':
in.lpd.c:512:17: error: comparison between pointer and integer [-Werror]
     while ((*cf != NULL) && (isdigit(*cf) == 0))
                 ^~

In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                 from cancel.c:30:
cancel.c: In function 'main':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 4 of 'papiPrinterListJobs' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
cancel.c:203:15: note: in expansion of macro 'NULL'
         NULL, NULL, 0, &jobs);
               ^~~~
In file included from cancel.c:36:0:
/code/illumos-gate/proto/root_i386/usr/include/papi.h:351:22: note: expected 'int' but argument is of type 'void *'
 extern papi_status_t papiPrinterListJobs(papi_service_t handle,
                      ^~~~~~~~~~~~~~~~~~~

conv_fix.c: In function '_file_getline':
conv_fix.c:67:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     *tmp = NULL;
          ^

lpset.c: In function 'main':
lpset.c:276:38: error: comparison between pointer and integer [-Werror]
    for (p = key; ((p != NULL) && (*p != NULL)); p++)
                                      ^~
lpset.c:278:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      *p = NULL;
         ^
lpset.c:284:35: error: comparison between pointer and integer [-Werror]
    if ((value != NULL) && (*value == NULL))
                                   ^~
lpset.c:287:33: error: comparison between pointer and integer [-Werror]
    if ((key != NULL) && (key[0] != NULL)) {
                                 ^~
cc1: all warnings being treated as errors

  
Robert Mustacchi
Gergő Mihály Doma
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...