Warnings in nsMenuBarX.cpp



16 years ago
10 years ago


(Reporter: timeless, Assigned: timeless)


Mac OS X

Firefox Tracking Flags

(Not tracked)



(2 attachments)



16 years ago
In file included from /Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.cpp:64:
/Developer/Headers/FlatCarbon/Traps.h:1:2: warning: #warning Traps.h is not
available on Mac OS X
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.h: In constructor
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.h:154: warning: member
   initializers for `nsIDocument*nsMenuBarX::mDocument'
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.h:141: warning:   and `
   PRUint32 nsMenuBarX::mCurrentCommandID'
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.cpp:88: warning:   will be
   re-ordered to match declaration order
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.cpp:89: warning: unused
   variable `OSStatus status'

Comment 1

16 years ago
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.cpp: In member function
   `virtual nsresult nsMenuBarX::AddMenu(nsIMenu*)':
/Users/timeless/mozilla/widget/src/cocoa/nsMenuBarX.cpp:570: warning: unused
   variable `OSStatus status'

Comment 2

16 years ago
Created attachment 128932 [details] [diff] [review]
Current diff between my sources and current CVS

Submitted in response to the warnings in the current bug. Grateful if SKS would

review those parts of this patch which are a positive contribution to Mozilla
and commit

Comment 3

16 years ago
You are probably compiling a non-DEBUG build as the two variables you mention
are used in ASSERTION statements.

Some people suggest that that variables used only for debugging and asserting
should be conditionally declared only in DEBUG builds (so that they are not
accidentally used for some real purpose).

I enclose my patch for this file which I think solves the problem in a different
way & I would be grateful for any comments.

I request a review of this patch and/or instructions on how to use the relevant

Comment 4

16 years ago
Created attachment 128957 [details] [diff] [review]
my diff

err, i meant to attach a patch, and this specific bug also accidentally posted
early, i meant to filter out some of the warnings. here's the patch that i had
in my tree just so you can see it. the original warnings for this bug were lost
when the computer i'm using here rebooted :(.

wrt debug only stuff yes don't worry about those warnings. i'm sorry this bug
came out so badly.

Comment 5

16 years ago
You don't seem to be checking the return value of
::SetMenuItemHierarchicalMenu(mRootMenu, 1, sAppleMenu);
at all. Is this what you mean?

Comment 6

16 years ago
Comment on attachment 128957 [details] [diff] [review]
my diff

I'm not storing the return since the old code didn't check it. if someone
actually wanted to check the return, someone could...
Attachment #128957 - Flags: superreview?(sfraser)
Attachment #128957 - Flags: review?(mozeditor)


16 years ago
Attachment #128957 - Flags: review?(mozeditor) → review+

Comment 7

15 years ago
Comment on attachment 128957 [details] [diff] [review]
my diff

Attachment #128957 - Flags: superreview?(sfraser) → superreview+

Comment 8

15 years ago
checked in
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.