Last Comment Bug 583608 - warning: ‘const char* GetMIMEType(nsIPluginInstance*)’ defined but not used in nsObjectFrame.cpp
: warning: ‘const char* GetMIMEType(nsIPluginInstance*)’ defined but not used i...
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86 Linux
-- normal (vote)
: mozilla6
Assigned To: Daniel Holbert [:dholbert]
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2010-08-01 10:51 PDT by Josh Matthews [:jdm]
Modified: 2011-04-21 14:54 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix (2.04 KB, patch)
2011-04-21 09:33 PDT, Daniel Holbert [:dholbert]
no flags Details | Diff | Splinter Review
fix v2 (2.07 KB, patch)
2011-04-21 13:51 PDT, Daniel Holbert [:dholbert]
jaas: review+
Details | Diff | Splinter Review

Description User image Josh Matthews [:jdm] 2010-08-01 10:51:19 PDT

Comment 1 User image Daniel Holbert [:dholbert] 2011-04-21 09:28:53 PDT
There are now 3 "defined but not used [on linux]" warnings for this file:
> layout/generic/nsObjectFrame.cpp:1975: warning: 'void DrawPlugin(mozilla::layers::ImageContainer*, void*)' defined but not used
> layout/generic/nsObjectFrame.cpp:1983: warning: 'void OnDestroyImage(void*)' defined but not used
> layout/generic/nsObjectFrame.cpp:2787: warning: 'const char* GetMIMEType(nsIPluginInstance*)' defined but not used

These functions are only called in #ifdef XP_MACOSX blocks, so the function definitions themselves should be #ifdef XP_MACOSX.
Comment 2 User image Daniel Holbert [:dholbert] 2011-04-21 09:33:24 PDT
Created attachment 527558 [details] [diff] [review]

This should do it. Testing locally & on tryserver as a cross-platform sanity-check.
Comment 3 User image Daniel Holbert [:dholbert] 2011-04-21 13:51:41 PDT
Created attachment 527643 [details] [diff] [review]
fix v2

Ah, tryserver told me that the previous patch had neglected to notice an #ifdef XP_WIN spot where "::GetMIMEType" is called.

This version tweaks the GetMIMEType ifdef to build if we're on XP_MACOSX or XP_WIN. This passed on TryServer.
Comment 4 User image Daniel Holbert [:dholbert] 2011-04-21 14:54:09 PDT

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