Closed Bug 1244870 Opened 9 years ago Closed 7 years ago

[CID 1351139] Uninitialized 'err' in OmxCommonVideoConfig::Apply()

Categories

(Core :: Audio/Video: Playback, defect, P3)

43 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: mozbugz, Assigned: jeanluc.bonnafoux)

Details

Attachments

(1 file, 1 obsolete file)

In dom/media/platforms/omx/OmxPlatformLayer.cpp: > 98 OMX_ERRORTYPE Apply(OmxPlatformLayer& aOmx, const VideoInfo& aInfo) override > 99 { 1. var_decl: Declaring variable err without initializer. >100 OMX_ERRORTYPE err; >101 OMX_PARAM_PORTDEFINITIONTYPE def; >102 >103 // Set up in/out port definition. >104 nsTArray<uint32_t> ports; >105 GetOmxPortIndex(ports); 2. No elements left in ports, leaving loop >106 for (auto idx : ports) { >[...] >129 } CID 1351139 (#1 of 1): Uninitialized scalar variable (UNINIT)3. uninit_use: Using uninitialized value err. >130 return err; >131 }
Summary: [CID 1351139} Uninitialized 'err' in OmxCommonVideoConfig::Apply() → [CID 1351139] Uninitialized 'err' in OmxCommonVideoConfig::Apply()
Mass change P2 -> P3
Priority: P2 → P3
Comment on attachment 8969752 [details] Bug 1244870 - initialization of err variable https://reviewboard.mozilla.org/r/238564/#review244884 ::: dom/media/platforms/omx/OmxPlatformLayer.cpp:57 (Diff revision 1) > - OMX_ERRORTYPE err; > + OMX_ERRORTYPE err = OMX_ErrorNone; > > OMX_PARAM_PORTDEFINITIONTYPE def; > InitOmxParameter(&def); > def.nPortIndex = aOmx.OutputPortIndex(); > err = aOmx.GetParameter(OMX_IndexParamPortDefinition, &def, sizeof(def)); declare err as OMX_ERRORTYPE where it's first use. eg. OMX_ERRORTYPR err = aOmx.GetParameter(....)
Attachment #8969752 - Flags: review?(jyavenard) → review-
Comment on attachment 8969752 [details] Bug 1244870 - initialization of err variable https://reviewboard.mozilla.org/r/238564/#review245132 ::: dom/media/platforms/omx/OmxPlatformLayer.cpp:57 (Diff revision 1) > - OMX_ERRORTYPE err; > + OMX_ERRORTYPE err = OMX_ErrorNone; > > OMX_PARAM_PORTDEFINITIONTYPE def; > InitOmxParameter(&def); > def.nPortIndex = aOmx.OutputPortIndex(); > err = aOmx.GetParameter(OMX_IndexParamPortDefinition, &def, sizeof(def)); Thanks for the code review, i will add a patch accordingly.
Attachment #8969752 - Attachment is obsolete: true
Attachment #8970656 - Flags: review?(jyavenard) → review+
Assignee: nobody → jeanluc.bonnafoux
Keywords: checkin-needed
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: