Closed Bug 235581 Opened 21 years ago Closed 21 years ago

Compiling /widget/src/mac generates warnings

Categories

(Core Graveyard :: GFX: Mac, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Usul, Assigned: Usul)

Details

Attachments

(1 file, 2 obsolete files)

a bunch of warnings are generated when you compile /widget/src/mac.
Attached patch Cleaning up obvious wrnings (obsolete) — Splinter Review
seeking review ...
Severity: normal → minor
Attachment #142245 - Flags: review?
Comment on attachment 142245 [details] [diff] [review] Cleaning up obvious wrnings >Index: nsDragService.cpp >=================================================================== >RCS file: /cvsroot/mozilla/widget/src/mac/nsDragService.cpp,v >retrieving revision 1.74 >diff -u -r1.74 nsDragService.cpp >--- nsDragService.cpp 11 Feb 2004 04:57:07 -0000 1.74 >+++ nsDragService.cpp 25 Feb 2004 16:56:53 -0000 >@@ -273,8 +273,8 @@ > // see it if you're paying attention, but who pays such close attention? > Rect dragRect; > ::GetRegionBounds(theDragRgn, &dragRect); >- theEvent.where.v = rint(dragRect.top + (dragRect.bottom - dragRect.top) / 2); >- theEvent.where.h = rint(dragRect.left + (dragRect.right - dragRect.left) / 2); >+ theEvent.where.v = rint((double)dragRect.top + ((double)dragRect.bottom - (double)dragRect.top) / 2); >+ theEvent.where.h = rint((double)dragRect.left + ((double)dragRect.right - (double)dragRect.left) / 2); Do we really need to convert between integer and floating point here? Just remove the rint()s. >Index: nsMacWindow.cpp >=================================================================== >RCS file: /cvsroot/mozilla/widget/src/mac/nsMacWindow.cpp,v >retrieving revision 1.139 >diff -u -r1.139 nsMacWindow.cpp >--- nsMacWindow.cpp 12 Jan 2004 08:25:16 -0000 1.139 >+++ nsMacWindow.cpp 25 Feb 2004 16:57:07 -0000 >@@ -429,7 +429,7 @@ > vOffset = kWindowTitleBarHeight; > break; > >- case eWindowType_invisible: >+ default: > // don't do anything > break; > } >@@ -569,6 +569,7 @@ > {kEventClassWindow, kEventWindowDrawContent} }; > OSStatus err1 = ::InstallWindowEventHandler ( mWindowPtr, > NewEventHandlerUPP(WindowEventHandler), 2, windEventList, this, NULL ); >+ NS_ASSERTION ( err1 == noErr, "Can't install Window Event han,dler"); Typo in the assertion. And this will still warn in opt builds (where the assertion is compiled out). Otherwise fine. r=sfraser
Attachment #142245 - Flags: review? → review+
I removed the uncheked return variables because the three OS calls above did not check retrun avlue either.
Attachment #142245 - Attachment is obsolete: true
Attachment #142261 - Flags: review?(pinkerton)
Fixing summary.
Summary: Compiling /widget/src/mac genertes warnings → Compiling /widget/src/mac generates warnings
Comment on attachment 142261 [details] [diff] [review] Simon's comment taken into account looks ok. r=pink
Attachment #142261 - Flags: review?(pinkerton) → review+
Attachment #142261 - Flags: superreview?(sfraser)
Attachment #142261 - Flags: superreview?(sfraser) → superreview+
Biesi, could you commit the patch ? I don't have the rights and pink doesn't have time to.
patching file nsMacMessagePump.cpp Hunk #2 succeeded at 824 (offset -8 lines). patching file nsMacWindow.cpp Hunk #1 FAILED at 429. Hunk #2 FAILED at 567. patching file nsNativeScrollbar.cpp Hunk #1 FAILED at 101. sorry, I don't currently have the time to fix these conflicts; but I can check this in if someone attaches an updated patch
It applies now
Attachment #142261 - Attachment is obsolete: true
Assignee: sfraser → qa-mozilla
checked in, please mark fixed if it is
Thanks a lot biesi.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: