11119 libumem: NULL pointer errors

Review Request #1904 - Created June 1, 2019 and updated

Information
Toomas Soome
illumos-gate
11119
95458d5...
Reviewers
general
../common/getpcstack.c: In function 'getpcstack':
../common/getpcstack.c:152:12: error: comparison between pointer and integer [-Werror]
    if (tmp == NULL || !on_altstack)
            ^~

In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                 from /code/illumos-gate/proto/root_i386/usr/include/umem.h:32,
                 from /code/illumos-gate/proto/root_i386/usr/include/umem_impl.h:35,
                 from ../common/umem_base.h:32,
                 from ../common/umem_update_thread.c:27:
../common/umem_update_thread.c: In function 'umem_create_update_thread':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/umem_update_thread.c:141:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, umem_update_thread, NULL,
                       ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/umem_impl.h:40:0,
                 from ../common/umem_base.h:32,
                 from ../common/umem_update_thread.c:27:
/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/unistd.h:40:0,
                 from ../common/misc.c:29:
../common/misc.c: In function 'print_sym':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/misc.c:247:18: note: in expansion of macro 'NULL'
  uintptr_t end = NULL;
                  ^~~~
cc1: all warnings being treated as errors

  

Issues

  • 2
  • 0
  • 0
  • 2
Description From Last Updated
(uintptr_t)NULL please? John Levon John Levon
ditto John Levon John Levon
John Levon

   
usr/src/lib/libumem/common/getpcstack.c (Diff revision 1)
 
 

(uintptr_t)NULL please?

usr/src/lib/libumem/common/misc.c (Diff revision 1)
 
 

ditto

Loading...