OFNHookProc callback in the file picker code should return a UINT_PTR

RESOLVED FIXED in mozilla7

Status

()

Core
Widget: Win32
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jimm, Assigned: m_kato)

Tracking

Trunk
mozilla7
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

fix
920 bytes, patch
neil@parkwaycc.co.uk
: review+
Details | Diff | Splinter Review
(Reporter)

Description

6 years ago
http://msdn.microsoft.com/en-us/library/ms646931(v=VS.85).aspx
Assignee: nobody → netzen
(Assignee)

Comment 1

6 years ago
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
(Assignee)

Comment 2

6 years ago
Created attachment 543369 [details] [diff] [review]
fix

fix for bustage on Win64

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

Updated

6 years ago
Attachment #543369 - Flags: review?(jmathies)

Comment 3

6 years ago
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.
Attachment #543369 - Flags: review?(jmathies) → review+
(Assignee)

Comment 4

6 years ago
fix white space issue too.
http://hg.mozilla.org/integration/mozilla-inbound/rev/08a813a47709
Assignee: netzen → m_kato
Status: NEW → ASSIGNED
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/08a813a47709
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
You need to log in before you can comment on or make changes to this bug.