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 `nsMenuBarX::nsMenuBarX()': /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'
/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'
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
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 flags.
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.
You don't seem to be checking the return value of ::SetMenuItemHierarchicalMenu(mRootMenu, 1, sAppleMenu); at all. Is this what you mean?
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...
Comment on attachment 128957 [details] [diff] [review] my diff sr=tor
Attachment #128957 - Flags: superreview?(sfraser) → superreview+
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.