From c53a886ba86546ea14866c7c9a4d3ea25e8c39ff Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sun, 10 Jan 2021 11:15:38 -0500 Subject: [PATCH] frontends/omx: fix build warning From code path, it's easy to see that the variable is only used with condition, and the variable gets initialized with the same condition before getting used, but we can initialize it when defined to avoid the warning. Signed-off-by: Leo Liu Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/frontends/omx/bellagio/vid_dec_av1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/omx/bellagio/vid_dec_av1.c b/src/gallium/frontends/omx/bellagio/vid_dec_av1.c index 3ee933136527..061eebcf7cf8 100644 --- a/src/gallium/frontends/omx/bellagio/vid_dec_av1.c +++ b/src/gallium/frontends/omx/bellagio/vid_dec_av1.c @@ -169,7 +169,7 @@ static void sequence_header_obu(vid_dec_PrivateType *priv, struct vl_vlc *vlc) seq->decoder_model_present_for_this_op[0] = 0; initial_display_delay_present_for_this_op = 0; } else { - uint8_t buffer_delay_length_minus_1; + uint8_t buffer_delay_length_minus_1 = 0; timing_info_present_flag = av1_f(vlc, 1); if (timing_info_present_flag) { @@ -1425,7 +1425,7 @@ static void frame_header_obu(vid_dec_PrivateType *priv, struct vl_vlc *vlc) { struct av1_sequence_header_obu *seq = &(priv->codec_data.av1.seq); struct av1_uncompressed_header_obu *hdr = &(priv->codec_data.av1.uncompressed_header); - unsigned idLen; + unsigned idLen = 0; unsigned allFrames; int i, j; -- GitLab