Closed Bug 1398134 Opened 2 years ago Closed 2 years ago
Fix warning 'temp
Value' may be used uninitialized in Unwrap Object Internal
My terminal is flooded with this warning when I build mozilla-central: > /home/nical/dev/mozilla/objdir/opt-dbg/dist/include/mozilla/RefPtr.h:193:5: warning: 'tempValue' may be used uninitialized in this function [-Wmaybe-uninitialized] > assign_with_AddRef(aRhs); > ^~~~~~~~~~~~~~~~~~ > /home/nical/dev/mozilla/objdir/opt-dbg/dist/include/mozilla/dom/BindingUtils.h:289:6: note: 'tempValue' was declared here > T* tempValue; > ^~~~~~~~~ It's not entirely clear to me if this can cause issues or if tempValue always gets initialized in the recursion and the compiler just can't see it. In any case with this amount of warnings it becomes easy to miss other potentially important warnings.
Assignee: nobody → nical.bugzilla
Attachment #8905955 - Flags: review?(bkelly)
Attachment #8905955 - Flags: review?(bkelly) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/171282de032d Fix warning in BindingUtils.h. r=bkelly
Improvement noticed: == Change summary for alert #9677 (as of September 27 2017 07:14 UTC) == Improvements: 3% compiler warnings summary android-4-0-armv7-api16 opt 1,150.00 -> 1,119.00 For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=9677
You need to log in before you can comment on or make changes to this bug.