10678 dtrace: NULL pointer errors
Review Request #1651 — Created April 2, 2019 and submitted
Information | |
---|---|
tsoome | |
illumos-gate | |
10678 | |
b57aafd... | |
Reviewers | |
general | |
../../intel/dtrace/dtrace_isa.c: In function 'dtrace_getpcstack': ../../intel/dtrace/dtrace_isa.c:88:33: error: comparison between pointer and integer [-Werror] if (--aframes == 0 && caller != NULL) { ^~ ../../intel/dtrace/dtrace_isa.c:96:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] caller = NULL; ^ ../../intel/dtrace/dtrace_isa.c:105:22: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] pcstack[depth++] = NULL; ^ ../../intel/dtrace/dtrace_isa.c: In function 'dtrace_getupcstack': ../../intel/dtrace/dtrace_isa.c:266:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] *pcstack++ = NULL; ^ ../../intel/dtrace/dtrace_isa.c: In function 'dtrace_getufpstack': ../../intel/dtrace/dtrace_isa.c:410:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] *pcstack++ = NULL; ^ ../../common/dtrace/dtrace.c: In function 'dtrace_dif_varstr': ../../common/dtrace/dtrace.c:3137:10: error: return makes integer from pointer without a cast [-Werror=int-conversion] return (NULL); ^ ../../common/dtrace/dtrace.c: In function 'dtrace_dif_variable': ../../common/dtrace/dtrace.c:3212:45: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] cpu_core[CPU->cpu_id].cpuc_dtrace_illval = NULL; ^ ../../common/dtrace/dtrace.c:3355:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] ustack[2] = NULL; ^ ../../common/dtrace/dtrace.c: In function 'dtrace_dif_variable_write': ../../common/dtrace/dtrace.c:3582:45: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] cpu_core[CPU->cpu_id].cpuc_dtrace_illval = NULL; ^ ../../common/dtrace/dtrace.c: In function 'dtrace_dif_subr': ../../common/dtrace/dtrace.c:4086:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4100:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4115:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4126:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4139:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4151:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4162:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4186:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4214:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4264:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4285:16: error: comparison between pointer and integer [-Werror] while (baddr != NULL && !(*flags & CPU_DTRACE_FAULT)) { ^~ ../../common/dtrace/dtrace.c:4289:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4399:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4423:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4428:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] for (regs[rd] = NULL; addr < addr_limit; addr++) { ^ ../../common/dtrace/dtrace.c:4466:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4472:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4607:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4614:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4618:12: error: comparison between pointer and integer [-Werror] if (addr == NULL) { ^~ ../../common/dtrace/dtrace.c:4639:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4680:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4681:24: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] mstate->dtms_strtok = NULL; ^ ../../common/dtrace/dtrace.c:4682:30: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] mstate->dtms_strtok_limit = NULL; ^ ../../common/dtrace/dtrace.c:4719:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4725:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4776:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4782:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4815:22: error: comparison between pointer and integer [-Werror] nelems, dest)) != NULL) ^~ ../../common/dtrace/dtrace.c:4840:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4846:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4906:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4911:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:4945:14: error: comparison between pointer and integer [-Werror] if (maddr != NULL) ^~ ../../common/dtrace/dtrace.c:4948:17: error: comparison between pointer and integer [-Werror] while (maddr != NULL && !(*flags & CPU_DTRACE_FAULT)) { ^~ ../../common/dtrace/dtrace.c:4958:16: error: comparison between pointer and integer [-Werror] if (scout == NULL) ^~ ../../common/dtrace/dtrace.c:4963:16: error: comparison between pointer and integer [-Werror] if (scout == NULL) ^~ ../../common/dtrace/dtrace.c:4968:16: error: comparison between pointer and integer [-Werror] if (scout == NULL) ^~ ../../common/dtrace/dtrace.c:5003:16: error: comparison between pointer and integer [-Werror] while (daddr != NULL && !(*flags & CPU_DTRACE_FAULT)) { ^~ ../../common/dtrace/dtrace.c:5045:14: error: comparison between pointer and integer [-Werror] if (daddr == NULL) ^~ ../../common/dtrace/dtrace.c:5068:13: error: comparison between pointer and integer [-Werror] if (daddr == NULL) { ^~ ../../common/dtrace/dtrace.c:5087:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5093:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5100:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5113:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5172:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5241:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5247:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5368:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5394:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5400:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5533:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5548:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5592:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5609:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:5719:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c: In function 'dtrace_dif_emulate': ../../common/dtrace/dtrace.c:6020:11: error: comparison between pointer and integer [-Werror] if (s1 != NULL && ^~ ../../common/dtrace/dtrace.c:6023:11: error: comparison between pointer and integer [-Werror] if (s2 != NULL && ^~ ../../common/dtrace/dtrace.c:6063:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:6097:18: error: comparison between pointer and integer [-Werror] if (regs[rd] == NULL) { ^~ ../../common/dtrace/dtrace.c:6160:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c:6194:18: error: comparison between pointer and integer [-Werror] if (regs[rd] == NULL) { ^~ ../../common/dtrace/dtrace.c:6276:27: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] curthread->t_predcache = NULL; ^ ../../common/dtrace/dtrace.c:6460:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] regs[rd] = NULL; ^ ../../common/dtrace/dtrace.c: In function 'dtrace_probe': ../../common/dtrace/dtrace.c:6958:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] mstate.dtms_strtok = NULL; ^ ../../common/dtrace/dtrace.c: In function 'dtrace_hash_collisions': ../../common/dtrace/dtrace.c:7654:9: error: return makes integer from pointer without a cast [-Werror=int-conversion] return (NULL); ^ ../../common/dtrace/dtrace.c: In function 'dtrace_ecb_action_add': ../../common/dtrace/dtrace.c:11004:12: error: comparison between pointer and integer [-Werror] if (arg == NULL) { ^~ In file included from ../../common/sys/param.h:48:0, from ../../common/sys/t_lock.h:38, from ../../common/sys/thread.h:36, from ../../common/sys/modctl.h:35, from ../../common/dtrace/dtrace.c:69: ../../common/dtrace/dtrace.c: In function 'dtrace_dof_difo': ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../../common/dtrace/dtrace.c:12845:29: note: in expansion of macro 'NULL' { DOF_SECT_NONE, 0, 0, 0, NULL } ^~~~ ../../common/sys/null.h:32:14: note: (near initialization for 'difo[4].align') #define NULL ((void *)0) ^ ../../common/dtrace/dtrace.c:12845:29: note: in expansion of macro 'NULL' { DOF_SECT_NONE, 0, 0, 0, NULL } ^~~~ ../../common/dtrace/dtrace.c: In function 'dtrace_helper': ../../common/dtrace/dtrace.c:14842:9: error: return makes integer from pointer without a cast [-Werror=int-conversion] return (NULL); ^ In file included from ../../common/sys/param.h:48:0, from ../../common/sys/t_lock.h:38, from ../../common/sys/thread.h:36, from ../../common/sys/modctl.h:35, from ../../common/dtrace/dtrace.c:69: ../../common/dtrace/dtrace.c: In function 'dtrace_attach': ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_create_minor_node' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../../common/dtrace/dtrace.c:16011:37: note: in expansion of macro 'NULL' DTRACEMNRN_DTRACE, DDI_PSEUDO, NULL) == DDI_FAILURE || ^~~~ In file included from ../../common/dtrace/dtrace.c:73:0: ../../common/sys/sunddi.h:1564:1: note: expected 'int' but argument is of type 'void *' ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, ^~~~~~~~~~~~~~~~~~~~~ In file included from ../../common/sys/param.h:48:0, from ../../common/sys/t_lock.h:38, from ../../common/sys/thread.h:36, from ../../common/sys/modctl.h:35, from ../../common/dtrace/dtrace.c:69: ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_create_minor_node' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../../common/dtrace/dtrace.c:16013:37: note: in expansion of macro 'NULL' DTRACEMNRN_HELPER, DDI_PSEUDO, NULL) == DDI_FAILURE) { ^~~~ In file included from ../../common/dtrace/dtrace.c:73:0: ../../common/sys/sunddi.h:1564:1: note: expected 'int' but argument is of type 'void *' ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type, ^~~~~~~~~~~~~~~~~~~~~ ../../common/dtrace/dtrace.c: In function 'dtrace_ioctl': ../../common/dtrace/dtrace.c:16571:11: error: comparison between pointer and integer [-Werror] if (arg == NULL) { ^~ cc1: all warnings being treated as errors
-
Looks good
-
usr/src/uts/common/dtrace/dtrace.c (Diff revision 1) I'm not sure if it makes sense to assign DTRACE_CACHEIDNONE instead of 0?
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+81 -81) |