11319 devfsadm: NULL pointer errors

Review Request #2056 - Created July 4, 2019 and submitted

Information
Toomas Soome
illumos-gate
11319
18013e8...
Reviewers
general
../cfg_link.c: In function 'pci_cfg_ap_path':
../cfg_link.c:730:26: error: comparison between pointer and integer [-Werror]
    if ((curnode == node) != NULL)
                          ^~

In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/string.h:33,
                 from ../devfsadm.c:38:
../devfsadm.c: In function 'main':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../devfsadm.c:380:25: note: in expansion of macro 'NULL'
    if (thr_create(NULL, NULL,
                         ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/libsysevent.h:29:0,
                 from ../devfsadm_impl.h:67,
                 from ../devfsadm.c:47:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/string.h:33,
                 from ../devfsadm.c:38:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../devfsadm.c:392:25: note: in expansion of macro 'NULL'
    if (thr_create(NULL, NULL,
                         ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/libsysevent.h:29:0,
                 from ../devfsadm_impl.h:67,
                 from ../devfsadm.c:47:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~
../devfsadm.c: In function 'parse_args':
../devfsadm.c:707:43: error: comparison between pointer and integer [-Werror]
    if ((mc.major == -1) || (mc.drvname[0] == NULL)) {
                                           ^~
../devfsadm.c: In function 'create_selector_list':
../devfsadm.c:6346:20: error: comparison between pointer and integer [-Werror]
  while ((*selector != NULL) && (error == FALSE)) {
                    ^~
../devfsadm.c: In function 'getnexttoken':
../devfsadm.c:7549:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *cp = NULL; /* terminate token */
        ^
cc1: all warnings being treated as errors

  

Issues

  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Garrett D'Amore
Toomas Soome
Andrew Stormont
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...