Last Comment Bug 668663 - OFNHookProc callback in the file picker code should return a UINT_PTR
: OFNHookProc callback in the file picker code should return a UINT_PTR
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla7
Assigned To: Makoto Kato [:m_kato]
:
Mentors:
Depends on:
Blocks: 660833
  Show dependency treegraph
 
Reported: 2011-06-30 15:56 PDT by Jim Mathies [:jimm]
Modified: 2011-07-02 02:39 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (920 bytes, patch)
2011-07-01 00:53 PDT, Makoto Kato [:m_kato]
neil: review+
Details | Diff | Splinter Review

Comment 1 Makoto Kato [:m_kato] 2011-07-01 00:52:15 PDT
Bug 660833 causes bustage on Win64

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1309501336.1309501679.4498.gz

d:/mozilla-build/python/python2.6.exe -O e:/builds/moz2_slave/cen-w64-dbg/build/build/cl.py cl -FonsFilePicker.obj -c -D_HAS_EXCEPTIONS=0 -I../../../dist/stl_wrappers  -D_IMPL_NS_WIDGET -DMOZ_UNICODE  -DMOZ_ENABLE_D3D9_LAYER -DMOZ_ENABLE_D3D10_LAYER -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"WINNT6.1\" -DOSARCH=WINNT -DEXCLUDE_SKIA_DEPENDENCIES -DCHROMIUM_MOZILLA_BUILD  -DUNICODE -D_UNICODE -DNOMINMAX -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DOS_WIN=1 -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN  -DCOMPILER_MSVC -I. -I/e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows/../xpwidgets -I/e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows -I/e/builds/moz2_slave/cen-w64-dbg/build/toolkit/xre -I/e/builds/moz2_slave/cen-w64-dbg/build/xpcom/base  -I/e/builds/moz2_slave/cen-w64-dbg/build/ipc/chromium/src -I/e/builds/moz2_slave/cen-w64-dbg/build/ipc/glue -I../../../ipc/ipdl/_ipdlheaders  -I/e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows -I. -I../../../dist/include -I../../../dist/include/nsprpub  -Ie:/builds/moz2_slave/cen-w64-dbg/build/obj-firefox/dist/include/nspr -Ie:/builds/moz2_slave/cen-w64-dbg/build/obj-firefox/dist/include/nss         -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4800 -we4553  -DDEBUG -D_DEBUG -DTRACING -Zi -Ie:/builds/moz2_slave/cen-w64-dbg/build/obj-firefox/dist/include/cairo -MDd           -FI ../../../dist/include/mozilla-config.h -DMOZILLA_CLIENT /e/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows/nsFilePicker.cpp
nsFilePicker.cpp

e:/builds/moz2_slave/cen-w64-dbg/build/widget/src/windows/nsFilePicker.cpp(311) : error C2440: '=' : cannot convert from 'unsigned int (__cdecl *)(HWND,UINT,WPARAM,LPARAM)' to 'LPOFNHOOKPROC'

        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Comment 2 Makoto Kato [:m_kato] 2011-07-01 00:53:43 PDT
Created attachment 543369 [details] [diff] [review]
fix

fix for bustage on Win64

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1309501336.1309501679.4498.gz
Comment 3 neil@parkwaycc.co.uk 2011-07-01 02:02:24 PDT
Comment on attachment 543369 [details] [diff] [review]
fix

>-static unsigned int CALLBACK FilePickerHook(HWND hwnd, UINT msg,
>+static UINT_PTR CALLBACK FilePickerHook(HWND hwnd, UINT msg,
>                                             WPARAM wParam, LPARAM lParam)
Nit: Ideally you would realign WPARAM with HWND again.
Comment 4 Makoto Kato [:m_kato] 2011-07-01 02:38:02 PDT
fix white space issue too.
http://hg.mozilla.org/integration/mozilla-inbound/rev/08a813a47709
Comment 5 Marco Bonardo [::mak] 2011-07-02 02:39:14 PDT
http://hg.mozilla.org/mozilla-central/rev/08a813a47709

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