Closed Bug 1445503 Opened 7 years ago Closed 7 years ago

widget/gtk/nsWindow.cpp CLAMP() breaks build with gcc 4.9

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: miketwebster, Assigned: miketwebster)

References

Details

Attachments

(1 file, 1 obsolete file)

Originally reported: https://bugzilla.mozilla.org/show_bug.cgi?id=1418749#c49 In nsWindow::SetProgress: widget/gtk/nsWindow.cpp:7097:80: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] This is being caused by the expansion of the CLAMP macro, which ends up checking if (progressPercent < 0) See: https://developer.gnome.org/glib/stable/glib-Standard-Macros.html#CLAMP:CAPS Currently blocking building of Thunderbird Dailies for linux.
Blocks: 1418749
Patch attached.
Attachment #8958657 - Flags: review?(karlt)
Attachment #8958657 - Flags: feedback?(jorgk)
Comment on attachment 8958657 [details] [diff] [review] 0001-Bug-1445503-widget-gtk-nsWindow.cpp-Use-MIN-instead-.patch Thanks again! >Subject: [PATCH] Bug 1445503 - widget/gtk/nsWindow.cpp: Use MIN instead of > CLAMP. CLAMP is unnecessary, as the minimum acceptable value is 0, and > progressPercent is unsigned. This can trigger the following warning/ error > in some builds: Gecko convention is to have just a summary in the first line, then a blank line, then the rest of the explanation. Something like: Bug 1445503 - Use MIN instead of unnecessary CLAMP r=karlt CLAMP is unnecessary as the minimum acceptable value is 0, and progressPercent is unsigned. CLAMP can trigger ...
Attachment #8958657 - Flags: review?(karlt)
Attachment #8958657 - Flags: review+
Attachment #8958657 - Flags: feedback?(jorgk)
Attachment #8958657 - Flags: feedback+
I was going to give this a try build, but someone stole my f? ;-) So I'll fix the commit message and ask for checkin :-)
Assignee: nobody → miketwebster
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Fixed commit message and added newline to the end of the file. Carrying over Karl's r+.
Attachment #8958657 - Attachment is obsolete: true
Attachment #8958732 - Flags: review+
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d25f89538c90 Use MIN instead of unnecessary CLAMP r=karlt
Keywords: checkin-needed
Thank you very much Michael, Karl, and Jörg.
(In reply to Jorg K (GMT+1) from comment #3) > but someone stole my f? ;-) Sorry about that. I guess I must be in the habit of ticking boxes. Thanks for finishing.
Status: ASSIGNED → 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

Created:
Updated:
Size: