Skip to content

Commit

Permalink
Initialize variable explicitly
Browse files Browse the repository at this point in the history
Compilation can otherwise complain with
"‘dp’ may be used uninitialized in this function [-Wmaybe-uninitialized]".
It is easy to eliminate such a sensitivity to compiler.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Jul 28, 2022
1 parent c89eb96 commit 45da914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdtrace/dt_cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ dt_construct(dtrace_hdl_t *dtp, dt_probe_t *prp, uint_t cflags, dt_ident_t *idp)
{
dt_pcb_t pcb;
dt_node_t *tnp;
dtrace_difo_t *dp;
dtrace_difo_t *dp = NULL;
int err;

if ((cflags & ~DTRACE_C_MASK) != 0) {
Expand Down

0 comments on commit 45da914

Please sign in to comment.