Closed Bug 797316 Opened 12 years ago Closed 12 years ago

Fix -Werror=conversion-null errors in Windows-only code

Categories

(Firefox Build System :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla18

People

(Reporter: jacek, Assigned: jacek)

References

Details

Attachments

(9 files)

Windows-only code was not fixed before landing bug 778980, because this warning is not supported by MSVC. They are errors when compiling with GCC/mingw.
Attached patch xpcom/threads part (deleted) — Splinter Review
Also fixes: HangMonitor.cpp:311:9: warning: enumeration value ‘kGeneralActivity’ not handled in switch [-Wswitch]
Attachment #667414 - Flags: review?(ehsan)
Attached patch dom/plugins part (deleted) — Splinter Review
Also fixes: NPEventWindows.h:101:81: warning: comparison is always true due to limited range of data type [-Wtype-limits] nsPluginsDirWin.cpp:283:10: warning: unused variable ‘bCheck’ [-Wunused-variable] nsPluginNativeWindowWin.cpp:697:29: warning: unused variable ‘win’ [-Wunused-variable] and --disable-accessibility builds that failed in nsNPAPIPlugin::RunPluginOOP
Attachment #667418 - Flags: review?(surkov.alexander)
Also fixes: nsPrintingPromptService.cpp:99:10: warning: unused variable ‘hWnd’ [-Wunused-variable] nsPrintingPromptService.cpp:45:18: warning: ‘gInstance’ defined but not used [-Wunused-variable]
Attachment #667420 - Flags: review?(ehsan)
Attached patch gfx/gl part (deleted) — Splinter Review
Also fixes: GLContextProviderWGL.cpp:506:14: warning: variable ‘isCurrent’ set but not used [-Wunused-but-set-variable]
Attachment #667421 - Flags: review?(bjacob)
Attached patch gfx/thebes part (deleted) — Splinter Review
Also fixes a few set but unused variables and: gfxGDIFontList.cpp:284:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Attachment #667423 - Flags: review?(jmuizelaar)
Attached patch ipc/ part (deleted) — Splinter Review
Also fixes: SyncChannel.h:166:13: warning: ‘mozilla::ipc::SyncChannel::mTimeoutMs’ will be initialized after [-Wreorder] SyncChannel.h:100:21: warning: ‘mozilla::ipc::SyncChannel::SyncStackFrame* mozilla::ipc::SyncChannel::mTopFrame’ [-Wreorder] SyncChannel.cpp:27:1: warning: when initialized here [-Wreorder] SyncChannel.cpp:91:13: warning: unused variable ‘msgSeqno’ [-Wunused-variable] WindowsMessageLoop.cpp:466:14: warning: unused variable ‘currentWndProc’ [-Wunused-variable] WindowsMessageLoop.cpp:95:5: warning: ‘{anonymous}::gEventLoopDepth’ defined but not used [-Wunused-variable]
Attachment #667429 - Flags: review?(jones.chris.g)
Also fixes -Wreorder warning
Attachment #667432 - Flags: review?(netzen)
Attached patch uriloader part (deleted) — Splinter Review
Also fixes: nsMIMEInfoWin.cpp:823:3: warning: multi-line comment [-Wcomment] and a few similar ones.
Attachment #667433 - Flags: review?(justin.lebar+bug)
Attachment #667432 - Flags: review?(netzen) → review+
Attached patch widget/windows part (deleted) — Splinter Review
Attachment #667435 - Flags: review?(cpearce)
(In reply to Jacek Caban from comment #6) > Created attachment 667429 [details] [diff] [review] > SyncChannel.cpp:91:13: warning: unused variable ‘msgSeqno’ > [-Wunused-variable] Fixed in bug 797111.
Attachment #667414 - Flags: review?(ehsan) → review+
Attachment #667420 - Flags: review?(ehsan) → review+
Comment on attachment 667433 [details] [diff] [review] uriloader part I'm not sure why I was tagged to review this, but it looks fine to me. Damn Windows and backslashes in paths...
Attachment #667433 - Flags: review?(justin.lebar+bug) → review+
(In reply to Jacek Caban from comment #0) > Windows-only code was not fixed before landing bug 778980, because this > warning is not supported by MSVC. They are errors when compiling with > GCC/mingw. Thanks for fixing these, Jacek. If Windows GCC/mingw builds were part of the tinderbox/try server, I would have caught them. <:)
Attachment #667423 - Flags: review?(jmuizelaar) → review+
Comment on attachment 667429 [details] [diff] [review] ipc/ part bent is a better reviewer for the win32 code here.
Attachment #667429 - Flags: review?(jones.chris.g) → review?(bent.mozilla)
Comment on attachment 667435 [details] [diff] [review] widget/windows part I think this is more Jimm's area than mine.
Attachment #667435 - Flags: review?(cpearce) → review?(jmathies)
Attachment #667429 - Flags: review?(bent.mozilla) → review+
Comment on attachment 667435 [details] [diff] [review] widget/windows part Builds ok w/msvc. Thanks for the patches!
Attachment #667435 - Flags: review?(jmathies) → review+
Comment on attachment 667418 [details] [diff] [review] dom/plugins part I'm not plugin module peer, redirecting request to Josh
Attachment #667418 - Flags: review?(surkov.alexander) → review?(joshmoz)
Comment on attachment 667421 [details] [diff] [review] gfx/gl part Review of attachment 667421 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #667421 - Flags: review?(bjacob) → review+
Attachment #667418 - Flags: review?(joshmoz) → review+
(In reply to Chris Peterson (:cpeterson) from comment #12) > Thanks for fixing these, Jacek. If Windows GCC/mingw builds were part of the > tinderbox/try server, I would have caught them. <:) mingw builds are Tier 3, so this is an acceptable state of affairs.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: