11157 libbe: NULL pointer errors

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

Information
Toomas Soome
illumos-gate
11157
26d12b3...
Reviewers
general
../common/be_create.c: In function 'be_get_snap':
../common/be_create.c:2839:13: error: comparison between pointer and integer [-Werror]
   if (cp[1] != NULL && cp[1] != '\0') {
             ^~

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/libgen.h:42,
                 from ../common/be_utils.c:36:
../common/be_utils.c: In function 'be_auto_snap_name':
/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)
              ^
../common/be_utils.c:2320:19: note: in expansion of macro 'NULL'
  time_t  utc_tm = NULL;
                   ^~~~
../common/be_utils.c: In function 'be_valid_auto_snap_name':
../common/be_utils.c:2507:11: error: comparison between pointer and integer [-Werror]
  if (c[1] == NULL || c[1] == '\0') {
           ^~
../common/be_utils.c:2526:11: error: comparison between pointer and integer [-Werror]
  if (c[1] == NULL || c[1] == '\0') {
           ^~
cc1: all warnings being treated as errors

  
John Levon
Ship It!
Loading...