Project

General

Profile

Bug #11157

libbe: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../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

History

#1

Updated by Electric Monk 4 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 47f78bf40e94882d167f6132e5dc25ffed0be6e5

commit  47f78bf40e94882d167f6132e5dc25ffed0be6e5
Author: Toomas Soome <tsoome@me.com>
Date:   2019-06-25T20:29:33.000Z

    11157 libbe: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF