Last Comment Bug 457803 - "nsDragService.cpp(146) : warning C4146: unary minus operator applied to unsigned type"
: "nsDragService.cpp(146) : warning C4146: unary minus operator applied to unsi...
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: Drag and Drop (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: mozilla14
Assigned To: :aceman
:
Mentors:
Depends on:
Blocks: buildwarning 374593
  Show dependency treegraph
 
Reported: 2008-09-29 19:54 PDT by Serge Gautherie (:sgautherie)
Modified: 2012-03-20 05:35 PDT (History)
7 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.05 KB, patch)
2012-03-18 09:30 PDT, :aceman
vladimir: review+
Details | Diff | Splinter Review

Description Serge Gautherie (:sgautherie) 2008-09-29 19:54:27 PDT
{
.../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
}
Comment 1 :aceman 2012-03-18 09:30:57 PDT
Created attachment 606980 [details] [diff] [review]
patch

Serge, can you try if this fixes it for you?
Comment 2 Serge Gautherie (:sgautherie) 2012-03-18 20:20:38 PDT
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
}
Comment 3 :aceman 2012-03-19 01:20:23 PDT
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.
Comment 4 :aceman 2012-03-19 12:41:39 PDT
So let's hope it is OK.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-03-19 15:53:27 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/a3140ea46ca2
Comment 6 Mounir Lamouri (:mounir) 2012-03-20 03:51:45 PDT
https://hg.mozilla.org/mozilla-central/rev/a3140ea46ca2

Note You need to log in before you can comment on or make changes to this bug.