Bug 10176 - Make WebCore compile with -Wundef
Summary: Make WebCore compile with -Wundef
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-31 18:01 PDT by Sam Weinig
Modified: 2006-08-03 15:29 PDT (History)
1 user (show)

See Also:


Attachments
patch (65.60 KB, patch)
2006-07-31 18:19 PDT, Sam Weinig
darin: review-
Details | Formatted Diff | Diff
patch 2 (81.31 KB, patch)
2006-08-02 11:53 PDT, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2006-07-31 18:01:42 PDT
Adding more gcc warning flags.
Comment 1 Sam Weinig 2006-07-31 18:19:56 PDT
Created attachment 9783 [details]
patch

This patch adds -Wundef to WebCore, WebKit, JavaScriptCore, and JavaScriptGlue and fixes them so that they compile.  One idea I had was to hold off on this particular version and use this as an opportunity to convert to using the PLATFORM() macros from WTF.  We could always do that in another patch as well.
Comment 2 Darin Adler 2006-07-31 18:54:13 PDT
Comment on attachment 9783 [details]
patch

+#if defined(SPEED_DEBUG) && SPEED_DEBUG < 1

That's definitely wrong. This needs to compile if SPEED_DEBUG is not defined.

THe other ones look pretty good, but I'd prefer that it consistently use #ifdef rather than a mix of #ifdef and #if defined.

Seems that all the #if __APPLE__ need to be changed too, although not on the OS X platform.

review- because of the SPEED_DEBUG mistake.
Comment 3 Sam Weinig 2006-07-31 19:21:11 PDT
Darin, would something like

#if !defined(SPEED_DEBUG) || SPEED_DEBUG < 1

work?
Comment 4 Darin Adler 2006-08-01 10:48:31 PDT
(In reply to comment #3)
> Darin, would something like
> 
> #if !defined(SPEED_DEBUG) || SPEED_DEBUG < 1
> 
> work?

Yes.
Comment 5 Darin Adler 2006-08-01 10:53:06 PDT
(In reply to comment #1)
> One idea I had was to hold off on this
> particular version and use this as an opportunity to convert to using the
> PLATFORM() macros from WTF.

I like that idea.
Comment 6 Sam Weinig 2006-08-02 11:53:39 PDT
Created attachment 9829 [details]
patch 2

This version fixes the SPEED_DEBUG issue and converts the #ifdef WIN32's from WebCore to #if PLATFORM(WIN_OS) and PLATFORM(WIN) (and in one case in config.h to #if !COMPILER(MSVC)).  Some of my choices between WIN_OS and WIN might very well be wrong because I am not entirely familiar with the WIN32 platform.
Comment 7 Darin Adler 2006-08-02 16:09:45 PDT
Comment on attachment 9829 [details]
patch 2

Not sure why you changed "many" to "majy" in the change log.

But, otherwise, looks great.

r=me
Comment 8 Sam Weinig 2006-08-03 15:29:53 PDT
Landed in r15781.