Closed Bug 883721 Opened 7 years ago Closed 7 years ago

Fix -Wunused-private-field and -Wunused-variable warnings in widget/cocoa

Categories

(Core :: Widget: Cocoa, defect, P4, minor)

x86
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 847709

People

(Reporter: cpeterson, Assigned: cpeterson)

Details

Attachments

(1 file)

These are the only warnings I see in widget/cocoa/ code when building Firefox for OSX:

widget/cocoa/GfxInfo.h:82:12 [-Wunused-private-field] private field 'mRendererIDs' is not used
widget/cocoa/nsMacWebAppUtils.mm:49:8 [-Wunused-variable] unused variable 'success'
Attachment #763388 - Flags: review?(joshmoz)
Comment on attachment 763388 [details] [diff] [review]
fix-cocoa-widget-warnings.patch

Review of attachment 763388 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/cocoa/GfxInfo.h
@@ -78,5 @@
>  
>    nsString mAdapterVendorID;
>    nsString mAdapterDeviceID;
>  
> -  uint32_t mRendererIDs[16];

This is "used," it's just macro-d out. See:

http://mxr.mozilla.org/mozilla-central/search?string=mRendererIDs

Please either use ifdef 0 to turn it off like in the impl code, or, depending on why the impl is turned off (I don't know), also delete the impl code.

::: widget/cocoa/nsMacWebAppUtils.mm
@@ -49,5 @@
> -  BOOL success = [[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:
> -                        [NSString stringWithCharacters:((nsString)bundleIdentifier).get() length:((nsString)bundleIdentifier).Length()]
> -                        options: (NSWorkspaceLaunchOptions)0
> -                        additionalEventParamDescriptor: nil
> -                        launchIdentifier: NULL];

I already have a fix for this. See bug 869083.
Attachment #763388 - Flags: review?(joshmoz) → review-
Thanks, Josh. I see the mRendererIDs portion of this bug is a duplicate of bug 847709.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 847709
You need to log in before you can comment on or make changes to this bug.