Closed Bug 1321877 Opened 8 years ago Closed 8 years ago

image/Downscaler.h:158:59: warning: returning reference to temporary [-Wreturn-local-addr]

Categories

(Core :: Graphics: ImageLib, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: tharvik, Assigned: tharvik)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/538.15+ (KHTML, like Gecko) vimb/2.11 Version/8.0 Safari/538.15

Steps to reproduce:

On Gentoo `emerge =www-client/firefox-45.5.0`
Compiling the codebase with gcc and `-Wreturn-local-addr` (default on).


Actual results:

image/Downscaler.h:158:59: warning: returning reference to temporary [-Wreturn-local-addr]
image/Downscaler.h:159:57: warning: returning reference to temporary [-Wreturn-local-addr]
image/Downscaler.h:160:48: warning: returning reference to temporary [-Wreturn-local-addr]



Expected results:

No warnings
Component: Untriaged → ImageLib
Product: Firefox → Core
Attachment #8816552 - Attachment is patch: true
Attachment #8816552 - Attachment mime type: text/x-patch → text/plain
Comment on attachment 8816552 [details] [diff] [review]
Patch for the trunk version (works for 45, not tested for trunk)

You may as well initialize mSize as well.
(In reply to Timothy Nikkel (:tnikkel) from comment #1)
> Comment on attachment 8816552 [details] [diff] [review]
> Patch for the trunk version (works for 45, not tested for trunk)
> 
> You may as well initialize mSize as well.
The default constructor would get called, if I'm correct.
Attachment #8816552 - Flags: review+
Assignee: nobody → tharvik
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
@:tnikkel, I'm supposed to ask you "to push it to the try server for testing", as I don't have any push access.
Pushed by tnikkel@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5cebfb1902a2
Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
https://hg.mozilla.org/mozilla-central/rev/5cebfb1902a2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: