Closed
Bug 606846
Opened 14 years ago
Closed 14 years ago
nsPluginNativeWindowWin.cpp compilation broken on mingw
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jacek, Assigned: jacek)
References
Details
Attachments
(1 file)
1.81 KB,
patch
|
jimm
:
review+
benjamin
:
approval2.0+
|
Details | Diff | Splinter Review |
I get following errors:
In file included from /home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp:55:0:
../../../../dist/include/nsWindowsDllInterceptor.h: In member function 'bool WindowsDllInterceptor::AddHook(const char*, void*, void**)':
../../../../dist/include/nsWindowsDllInterceptor.h:119:57: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp: In function 'void HookSetWindowLongPtr()':
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp:508:67: error: no matching function for call to 'WindowsDllInterceptor::AddHook(const char [15], LONG (&)(HWND__*, int, LONG), void**)'
../../../../dist/include/nsWindowsDllInterceptor.h:112:8: note: candidate is: bool WindowsDllInterceptor::AddHook(const char*, void*, void**) <near match>
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp:510:67: error: no matching function for call to 'WindowsDllInterceptor::AddHook(const char [15], LONG (&)(HWND__*, int, LONG), void**)'
../../../../dist/include/nsWindowsDllInterceptor.h:112:8: note: candidate is: bool WindowsDllInterceptor::AddHook(const char*, void*, void**) <near match>
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp: In constructor 'nsPluginNativeWindowWin::nsPluginNativeWindowWin()':
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp:531:17: warning: converting to non-pointer type 'LONG_PTR' from NULL
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp: In member function 'nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()':
/home/jacek/mozilla-build/mozilla-central/modules/plugin/base/src/nsPluginNativeWindowWin.cpp:770:19: warning: converting to non-pointer type 'LONG_PTR' from NULL
GCC is stricter than MSVC for function pointer casts and it doesn't implicitly casts function pointers to void. The fix is as simple as adding an explicit cast.
While I was at this, I've fixed warnings about assigning NULL to integer type.
Assignee | ||
Updated•14 years ago
|
Attachment #485612 -
Attachment is patch: true
Attachment #485612 -
Flags: review?(jmathies)
Comment 1•14 years ago
|
||
Comment on attachment 485612 [details] [diff] [review]
fix v1.0
nit, static_cast<void*>() vs the c style (void*).
Attachment #485612 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 2•14 years ago
|
||
(In reply to comment #1)
> Comment on attachment 485612 [details] [diff] [review]
> fix v1.0
>
> nit, static_cast<void*>() vs the c style (void*).
Thanks for the review. I should write it in my first comment that static_cast won't work here. GCC doesn't consider such cast as safe:
nsPluginNativeWindowWin.cpp:507:83: error: invalid static_cast from type 'LONG(HWND__*, int, LONG)' to type 'void*'
Assignee | ||
Updated•14 years ago
|
Attachment #485612 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #485612 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 3•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•