Project

General

Profile

Bug #11156

libzfs: 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/libzfs_util.c: In function 'zcmd_free_nvlists':
    ../common/libzfs_util.c:790:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      zc->zc_nvlist_conf = NULL;
                         ^
    ../common/libzfs_util.c:791:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      zc->zc_nvlist_src = NULL;
                        ^
    ../common/libzfs_util.c:792:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      zc->zc_nvlist_dst = NULL;
                        ^

    ../common/libzfs_sendrecv.c: In function 'zfs_receive_one':
    ../common/libzfs_sendrecv.c:3190:42: error: comparison between pointer and integer [-Werror]
      stream_wantsnewfs = (drrb->drr_fromguid == 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/libzfs_dataset.c:40:
    ../common/libzfs_dataset.c: In function 'zfs_prop_get':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'zcp_check' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libzfs_dataset.c:2595:24: note: in expansion of macro 'NULL'
       zcp_check(zhp, prop, NULL, propbuf);
                            ^~~~
    ../common/libzfs_dataset.c:2418:1: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'void *'
     zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
     ^~~~~~~~~
    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/libzfs_dataset.c:40:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'zcp_check' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libzfs_dataset.c:2603:24: note: in expansion of macro 'NULL'
       zcp_check(zhp, prop, NULL, str);
                            ^~~~
    ../common/libzfs_dataset.c:2418:1: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'void *'
     zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
     ^~~~~~~~~
    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/libzfs_dataset.c:40:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'zcp_check' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libzfs_dataset.c:2693:24: note: in expansion of macro 'NULL'
       zcp_check(zhp, prop, NULL, propbuf);
                            ^~~~
    ../common/libzfs_dataset.c:2418:1: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'void *'
     zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
     ^~~~~~~~~
    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/libzfs_dataset.c:40:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'zcp_check' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libzfs_dataset.c:2719:24: note: in expansion of macro 'NULL'
       zcp_check(zhp, prop, NULL, propbuf);
                            ^~~~
    ../common/libzfs_dataset.c:2418:1: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'void *'
     zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
     ^~~~~~~~~
    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/libzfs_dataset.c:40:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'zcp_check' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libzfs_dataset.c:2796:25: note: in expansion of macro 'NULL'
        zcp_check(zhp, prop, NULL, str);
                             ^~~~
    ../common/libzfs_dataset.c:2418:1: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'void *'
     zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
     ^~~~~~~~~
    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/libzfs_dataset.c:40:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'zcp_check' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libzfs_dataset.c:2807:25: note: in expansion of macro 'NULL'
        zcp_check(zhp, prop, NULL, strval);
                             ^~~~
    ../common/libzfs_dataset.c:2418:1: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'void *'
     zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
     ^~~~~~~~~
    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 5b8cbb8e38f948539d47f11d870efecefc5df9c0

commit  5b8cbb8e38f948539d47f11d870efecefc5df9c0
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-03T07:38:19.000Z

    11156 libzfs: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF