Closed Bug 1515296 Opened 5 years ago Closed 4 years ago

AddonManagerStartup-inlines.h:91:25: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]

Categories

(Developer Infrastructure :: Source Code Analysis, defect, P2)

defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(2 files)

/root/firefox-gcc-last/toolkit/mozapps/extensions/AddonManagerStartup-inlines.h: In instantiation of 'mozilla::BaseIterElem<T, IterType>::SelfType mozilla::BaseIterElem<T, IterType>::End() const [with T = mozilla::PropertyIterElem; IterType = mozilla::PropertyIter; mozilla::BaseIterElem<T, IterType>::SelfType = mozilla::PropertyIterElem]':
 /root/firefox-gcc-last/toolkit/mozapps/extensions/AddonManagerStartup-inlines.h:36:21:   required from 'PropertyType mozilla::BaseIter<T, PropertyType>::end() const [with T = mozilla::PropertyIter; PropertyType = mozilla::PropertyIterElem]'
 /root/firefox-gcc-last/toolkit/mozapps/extensions/AddonManagerStartup.cpp:487:39:   required from here
 /root/firefox-gcc-last/toolkit/mozapps/extensions/AddonManagerStartup-inlines.h:91:25: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
    91 |     return std::move(end);
       |                         ^
Component: Lint and Formatting → Source Code Analysis
Priority: -- → P2
Assignee: nobody → sledru
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/614019a3a5d7
Remove some std::move to fix a gcc warning r=emilio
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/70e27e94e164
Follow up - fix the variable r=emilio on a CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: