All users were logged out of Bugzilla on October 13th, 2018

nsDeviceContext.cpp:764:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

RESOLVED FIXED in mozilla13

Status

()

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug)

Trunk
mozilla13
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
{
nsDeviceContext.cpp: In member function ‘bool nsDeviceContext::SetPixelScale(float)’:
nsDeviceContext.cpp:764:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}

Code in question:
> 761     PRInt32 oldAppUnitsPerDevPixel = mAppUnitsPerDevPixel;
> 762     mPixelScale = aScale;
> 763     UpdateScaledAppUnits();
> 764     return oldAppUnitsPerDevPixel != mAppUnitsPerDevPixel;

mAppUnitsPerDevPixel used to be a signed int, but it was changed a few months back to be unsigned (in bug 678222).

oldAppUnitsPerDevPixel is just a temporary cached copy of mAppUnitsPerDevPixel, and its type should clearly match.
(Assignee)

Comment 1

7 years ago
Created attachment 601390 [details] [diff] [review]
fix
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #601390 - Flags: review?(joe)
(Assignee)

Comment 2

7 years ago
For reference, here's the change that made mAppUnitsPerDevPixel unsigned:
 http://hg.mozilla.org/mozilla-central/diff/8a2432d7f8f3/gfx/src/nsDeviceContext.h
Attachment #601390 - Flags: review?(joe) → review+
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
Heck, let's give it a try.
Whiteboard: [autoland]

Updated

7 years ago
Whiteboard: [autoland] → [autoland-in-queue]

Comment 4

7 years ago
Autoland Patchset:
	Patches: 601390
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=1a8be8b85af3
Try run started, revision 1a8be8b85af3. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=1a8be8b85af3

Comment 5

7 years ago
Try run for 1a8be8b85af3 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=1a8be8b85af3
Results (out of 169 total builds):
    exception: 5
    success: 134
    warnings: 30
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-1a8be8b85af3

Updated

7 years ago
Whiteboard: [autoland-in-queue]
http://hg.mozilla.org/integration/mozilla-inbound/rev/31af9742004c
Keywords: checkin-needed
Target Milestone: --- → mozilla13
https://hg.mozilla.org/mozilla-central/rev/31af9742004c
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.