Closed Bug 457803 Opened 16 years ago Closed 12 years ago

"nsDragService.cpp(146) : warning C4146: unary minus operator applied to unsigned type"

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: sgautherie, Assigned: aceman)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

{
.../widget/src/windows/nsDragService.cpp(146) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
}

Code is:
{
121  PRUint32 bmWidth = dragRect.width, bmHeight = dragRect.height;
...
142  BITMAPV5HEADER bmih;
...
146  bmih.bV5Height      = -bmHeight; // flip vertical
}
Whiteboard: [build_warning]
Blocks: buildwarning
Attached patch patchSplinter Review
Serge, can you try if this fixes it for you?
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #606980 - Flags: feedback?(sgautherie.bz)
Comment on attachment 606980 [details] [diff] [review]
patch

(In reply to :aceman from comment #1)
> Serge, can you try if this fixes it for you?

I can't build anymore, but you can Try it:

https://tbpl.mozilla.org/php/getParsedLog.php?id=10171351&tree=Try&full=1
WINNT 5.2 try build on 2012-03-18 17:48:24 PDT for push 76573506d189
{
[...]/widget/windows/nsDragService.cpp(147) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
}
Attachment #606980 - Flags: feedback?(sgautherie.bz)
Comment on attachment 606980 [details] [diff] [review]
patch

Thanks, looks like there is no warning now. Let's poke some reviewer if the change is OK and doesn't change the logic.
Attachment #606980 - Flags: review?(vladimir)
So let's hope it is OK.
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/a3140ea46ca2
Flags: in-testsuite-
Keywords: checkin-needed
OS: Windows 2000 → All
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/a3140ea46ca2
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: