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

RESOLVED FIXED in mozilla18

Status

defect
RESOLVED FIXED
7 years ago
2 years ago

People

(Reporter: jacek, Assigned: jacek)

Tracking

Trunk
mozilla18
x86
Windows 7
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(9 attachments)

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.
Also fixes:

HangMonitor.cpp:311:9: warning: enumeration value ‘kGeneralActivity’ not handled in switch [-Wswitch]
Attachment #667414 - Flags: review?(ehsan)
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)
Posted patch gfx/gl partSplinter Review
Also fixes:

GLContextProviderWGL.cpp:506:14: warning: variable ‘isCurrent’ set but not used [-Wunused-but-set-variable]
Attachment #667421 - Flags: review?(bjacob)
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)
Posted patch ipc/ partSplinter 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)
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+
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.