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

RESOLVED FIXED in mozilla14

Status

()

Core
Drag and Drop
RESOLVED FIXED
9 years ago
5 years ago

People

(Reporter: sgautherie, Assigned: aceman)

Tracking

(Blocks: 1 bug)

Trunk
mozilla14
x86
All
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
{
.../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
}

Updated

6 years ago
Whiteboard: [build_warning]

Updated

6 years ago
Blocks: 187528
(Assignee)

Comment 1

5 years ago
Created attachment 606980 [details] [diff] [review]
patch

Serge, can you try if this fixes it for you?
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #606980 - Flags: feedback?(sgautherie.bz)
(Reporter)

Comment 2

5 years ago
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)
(Assignee)

Comment 3

5 years ago
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)
Attachment #606980 - Flags: review?(vladimir) → review+
(Assignee)

Comment 4

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.