Actions
Bug #10721
closedib: NULL pointer errors
Start date:
2019-04-10
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
NULL pointer errors:
../../common/io/ib/ibnex/ibnex_ioctl.c: In function 'ibnex_ctl_query_hca': ../../common/io/ib/ibnex/ibnex_ioctl.c:2950:22: error: pointer/integer type mismatch in conditional expression [-Werror] ? (device_path) : NULL; \ ^ ../../common/io/ib/ibnex/ibnex_ioctl.c:3026:3: note: in expansion of macro 'IBNEX_CTL_CP_HCA_INFO' IBNEX_CTL_CP_HCA_INFO(&query_hca_32->hca_info, hca_attr, ^~~~~~~~~~~~~~~~~~~~~ ../../common/io/ib/ibnex/ibnex_ioctl.c:2949:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] (x)->hca_device_path = ((device_path_alloc_sz) >= (device_path_len)) \ ^ ../../common/io/ib/ibnex/ibnex_ioctl.c:3026:3: note: in expansion of macro 'IBNEX_CTL_CP_HCA_INFO' IBNEX_CTL_CP_HCA_INFO(&query_hca_32->hca_info, hca_attr, ^~~~~~~~~~~~~~~~~~~~~ In file included from ../../common/sys/param.h:48:0, from ../../common/sys/t_lock.h:38, from ../../common/sys/conf.h:37, from ../../common/io/ib/ibnex/ibnex.c:46: ../../common/io/ib/ibnex/ibnex.c: In function 'ibnex_attach': ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_prop_create' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../../common/io/ib/ibnex/ibnex.c:529:43: note: in expansion of macro 'NULL' "pm-want-child-notification?", NULL, NULL) != DDI_PROP_SUCCESS) { ^~~~ In file included from ../../common/sys/esunddi.h:29:0, from ../../common/sys/sunmdi.h:33, from ../../common/sys/mdi_impldefs.h:32, from ../../common/io/ib/ibnex/ibnex.c:50: ../../common/sys/sunddi.h:935:1: note: expected 'int' but argument is of type 'void *' ddi_prop_create(dev_t dev, dev_info_t *dip, int flag, ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
Updated by Electric Monk almost 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit bf8d275a3639b21395ae091b2ec762346fc931f6
commit bf8d275a3639b21395ae091b2ec762346fc931f6 Author: Toomas Soome <tsoome@me.com> Date: 2019-08-14T15:48:39.000Z 10721 ib: NULL pointer errors Reviewed by: Robert Mustacchi <robert.mustacchi@joyent.com> Reviewed by: Gordon Ross <gordon.ross@nexenta.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions