11170 print: NULL pointer errors

Review Request #1955 — Created June 1, 2019 and submitted — Latest diff uploaded

tsoome
illumos-gate
11170
2017, 2016, 2015, 2014
c025d55...
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 ../common/lpd-misc.c:31:
../common/lpd-misc.c: In function 'recvfd':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/lpd-misc.c:86:19: note: in expansion of macro 'NULL'
  memset(&recv_fd, NULL, sizeof (recv_fd));
                   ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/lpd-misc.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~

../common/common.c: In function 'add_supported_locales':
../common/common.c:253:43: error: comparison between pointer and integer [-Werror]
    for (i = 0; ((passed == 1) && (name[i] != NULL)); i++)
                                           ^~

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 ../common/lpd-job.c:32:
../common/lpd-job.c: In function 'lpd_add_svr4_attributes':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/lpd-job.c:387:14: note: in expansion of macro 'NULL'
  memset(tmp, NULL, sizeof (tmp));
              ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/lpd-job.c:40:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~

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 ../common/attribute.c:32:
../common/attribute.c: In function '_process_value':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: incompatible types when initializing type 'enum <anonymous>' using type 'void *'
 #define NULL ((void *)0)
              ^
../common/attribute.c:651:3: note: in expansion of macro 'NULL'
   NULL
   ^~~~

../common/ns_cmn_printer.c: In function 'ns_printer_name_list':
../common/ns_cmn_printer.c:154:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  buf[strlen(buf) - 1] = (char)NULL;
                         ^
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 ../common/list.c:30:
../common/list.c: In function 'list_append':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/list.c:61:23: note: in expansion of macro 'NULL'
   (void) memset(list, NULL, (_list_increment * sizeof (void *)));
                       ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/strings.h:36,
                 from ../common/list.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/list.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/list.c:75:28: note: in expansion of macro 'NULL'
    (void) memset(new_list, NULL,
                            ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/strings.h:36,
                 from ../common/list.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/list.c:30:
../common/list.c: In function 'list_concatenate':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/list.c:149:23: note: in expansion of macro 'NULL'
   (void) memset(list, NULL, (new_size * sizeof (void *)));
                       ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/strings.h:36,
                 from ../common/list.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
../common/nss_convert.c: In function 'strncat_escaped':
../common/nss_convert.c:56:13: error: comparison between pointer and integer [-Werror]
  while ((*t != NULL) && (len > 0))
             ^~
../common/nss_convert.c:62:13: error: comparison between pointer and integer [-Werror]
  while ((*s != NULL) && (len > 0)) {
             ^~
../common/nss_convert.c:67:5: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  *t = NULL;
     ^
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 ../common/nss_convert.c:33:
../common/nss_convert.c: In function '_cvt_printer_to_entry':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:80:21: note: in expansion of macro 'NULL'
  (void) memset(buf, NULL, buflen);
                     ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:86:22: note: in expansion of macro 'NULL'
   (void) memset(buf, NULL, buflen);
                      ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:102:22: note: in expansion of macro 'NULL'
   (void) memset(buf, NULL, buflen);
                      ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:124:22: note: in expansion of macro 'NULL'
   (void) memset(buf, NULL, buflen);
                      ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:130:22: note: in expansion of macro 'NULL'
   (void) memset(buf, NULL, buflen);
                      ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
../common/nss_convert.c: In function '_cvt_nss_entry_to_printer':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:152:21: note: in expansion of macro 'NULL'
  (void) memset(buf, NULL, sizeof (buf));
                     ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
../common/nss_convert.c:153:23: error: comparison between pointer and integer [-Werror]
  for (cp = entry; *cp != NULL; cp++) {
                       ^~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:169:23: note: in expansion of macro 'NULL'
    (void) memset(buf, NULL, sizeof (buf));
                       ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:176:24: note: in expansion of macro 'NULL'
     (void) memset(buf, NULL, sizeof (buf));
                        ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
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 ../common/nss_convert.c:33:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/nss_convert.c:189:24: note: in expansion of macro 'NULL'
     (void) memset(buf, NULL, sizeof (buf));
                        ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0,
                 from ../common/nss_convert.c:37:
/code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *'
 extern void *memset(void *, int, size_t);
              ^~~~~~
../common/ns_bsd_addr.c: In function 'string_to_value':
../common/ns_bsd_addr.c:202:54: error: comparison between pointer and integer [-Werror]
  if ((key != NULL) && (string != NULL) && (string[0] != NULL)) {
                                                      ^~
../common/ns_bsd_addr.c: In function 'posix_name':
../common/ns_bsd_addr.c:282:14: error: comparison between pointer and integer [-Werror]
   if (buf[0] != NULL) {
              ^~

../common/nss_write.c: In function 'freadline':
../common/nss_write.c:67:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     *s = NULL;
        ^
../common/nss_write.c: In function 'nis_put_printer':
../common/nss_write.c:276:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *tmp = NULL; /* strip the .byname */
        ^
cc1: all warnings being treated as errors


Loading...