11162 libzfs_jni: NULL pointer errors

Review Request #1947 - Created June 1, 2019 and submitted

Information
Toomas Soome
illumos-gate
11162
1974d3e...
Reviewers
general
../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

  
John Levon
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...