[DTrace-devel] [PATCH 1/3] Avoid a possible compiler complaint about uninitialized variable
Kris Van Hees
kris.van.hees at oracle.com
Thu Aug 31 03:38:13 UTC 2023
On Tue, Aug 22, 2023 at 05:46:54PM -0400, eugene.loh at oracle.com via DTrace-devel wrote:
>
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>
... Thanks for the catch!
... I did modify the patch a bit because we can also more lbl_dflt into the
code block where it is used, and also by making the last conditional for
setting the NOP at lbl_done to be conditional on lbl_done != DT_LBL_NONE
rather than is_dvar. So I'll add myself as signed off by as well since
I should take responsility for that change :)
> ---
> libdtrace/dt_cg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
> index 5391a143..0a7149b3 100644
> --- a/libdtrace/dt_cg.c
> +++ b/libdtrace/dt_cg.c
> @@ -3666,7 +3666,7 @@ dt_cg_incdec_op(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp, uint_t op,
> ssize_t adj = 1;
> int is_dvar = 0;
> uint_t rbit = dnp->dn_child->dn_flags & DT_NF_REF;
> - uint_t lbl_dflt, lbl_done;
> + uint_t lbl_dflt, lbl_done = DT_LBL_NONE;
> dt_ident_t *idp = NULL;
>
> TRACE_REGSET(" incdec: Begin");
> --
> 2.18.4
>
>
More information about the DTrace-devel
mailing list