Project

General

Profile

Bug #11162

libzfs_jni: 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_jni_diskmgt.c: In function 'get_disk':
    ../common/libzfs_jni_diskmgt.c:127:16: error: comparison between pointer and integer [-Werror]
             *media == NULL) {
                    ^~
    ../common/libzfs_jni_diskmgt.c: In function 'get_disk_aliases':
    ../common/libzfs_jni_diskmgt.c:180:26: error: comparison between pointer and integer [-Werror]
       for (j = 0; aliases[j] != NULL; j++)
                              ^~
    ../common/libzfs_jni_diskmgt.c:190:42: error: comparison between pointer and integer [-Werror]
        for (j = 0; *error == 0 && aliases[j] != NULL; j++) {
                                              ^~
    ../common/libzfs_jni_diskmgt.c: In function 'get_disk_slices':
    ../common/libzfs_jni_diskmgt.c:274:35: error: comparison between pointer and integer [-Werror]
           slices != NULL && slices[j] != NULL; j++) {
                                       ^~
    ../common/libzfs_jni_diskmgt.c: In function 'dmgt_avail_disk_iter':
    ../common/libzfs_jni_diskmgt.c:693:41: error: comparison between pointer and integer [-Werror]
       for (i = 0; disks != NULL && disks[i] != NULL; i++) {
                                             ^~
    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 48ac33d9704973f66601cb41a25fbc454be652d9

commit  48ac33d9704973f66601cb41a25fbc454be652d9
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-01T18:41:34.000Z

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

Also available in: Atom PDF