2009-01-23 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2009 19:58:29 +0000 (19:58 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2009 19:58:29 +0000 (19:58 +0000)
        Reviewed by Sam Weinig.

        Turn on -Wmissing-prototypes and fix the resulting warnings.

        * Configurations/Base.xcconfig:
        * History/WebHistory.mm:
        (timeIntervalForBeginningOfDay):
        * History/WebHistoryItem.mm:
        (historyItemWrappers):
        * Misc/WebNSPasteboardExtras.mm:
        (imageFromElement):
        * WebView/WebFrame.mm:
        * WebView/WebScriptDebugger.mm:
        (toNSString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/mac/ChangeLog
WebKit/mac/Configurations/Base.xcconfig
WebKit/mac/History/WebHistory.mm
WebKit/mac/History/WebHistoryItem.mm
WebKit/mac/Misc/WebNSPasteboardExtras.mm
WebKit/mac/WebView/WebFrame.mm
WebKit/mac/WebView/WebScriptDebugger.mm

index 9bcbb56..9a206a3 100644 (file)
@@ -1,3 +1,20 @@
+2009-01-23  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Turn on -Wmissing-prototypes and fix the resulting warnings.
+
+        * Configurations/Base.xcconfig:
+        * History/WebHistory.mm:
+        (timeIntervalForBeginningOfDay):
+        * History/WebHistoryItem.mm:
+        (historyItemWrappers):
+        * Misc/WebNSPasteboardExtras.mm:
+        (imageFromElement):
+        * WebView/WebFrame.mm:
+        * WebView/WebScriptDebugger.mm:
+        (toNSString):
+
 2009-01-22  Mark Rowe  <mrowe@apple.com>
 
         Rubber-stamped by Anders Carlsson.
index b6acd73..034cc9e 100644 (file)
@@ -16,14 +16,13 @@ GCC_THREADSAFE_STATICS = NO;
 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
 LINKER_DISPLAYS_MANGLED_NAMES = YES;
 OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
 PREBINDING = NO;
 VALID_ARCHS = i386 ppc x86_64 ppc64;
 // FIXME: <rdar://problem/5070292> WebKit should build with -Wshorten-64-to-32
-WARNING_CFLAGS = -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wundef;
+WARNING_CFLAGS = -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wundef -Wmissing-prototypes;
 
 
 // DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL and STRIP_INSTALLED_PRODUCT vary between the debug and normal variants.
index 7b1f3e9..d1467a7 100644 (file)
@@ -135,7 +135,7 @@ NSString *DatesArrayKey = @"WebHistoryDates";
 
 #pragma mark MODIFYING CONTENTS
 
-WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
+static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
 {
     CFTimeZoneRef timeZone = CFTimeZoneCopyDefault();
     CFGregorianDate date = CFAbsoluteTimeGetGregorianDate(interval, timeZone);
index 3eec4ad..ce4bbfc 100644 (file)
@@ -74,7 +74,7 @@ typedef HashMap<HistoryItem*, WebHistoryItem*> HistoryItemMap;
 static inline WebHistoryItemPrivate* kitPrivate(WebCoreHistoryItem* list) { return (WebHistoryItemPrivate*)list; }
 static inline WebCoreHistoryItem* core(WebHistoryItemPrivate* list) { return (WebCoreHistoryItem*)list; }
 
-HistoryItemMap& historyItemWrappers()
+static HistoryItemMap& historyItemWrappers()
 {
     DEFINE_STATIC_LOCAL(HistoryItemMap, historyItemWrappers, ());
     return historyItemWrappers;
index dcc719d..34c39dd 100644 (file)
@@ -211,7 +211,7 @@ static NSArray *_writableTypesForImageWithArchive (void)
     
 }
 
-CachedImage* imageFromElement(DOMElement *domElement) {
+static CachedImage* imageFromElement(DOMElement *domElement) {
     Element* element = core(domElement);
     if (!element)
         return 0;
index a8000d7..c9277f2 100644 (file)
@@ -188,11 +188,6 @@ DOMNode *kit(Node* node)
     return [DOMNode _wrapNode:node];
 }
 
-DOMNode *kit(PassRefPtr<Node> node)
-{
-    return [DOMNode _wrapNode:node.get()];
-}
-
 Document* core(DOMDocument *document)
 {
     return [document _document];
index ef8bae6..2ab803c 100644 (file)
@@ -55,7 +55,7 @@ NSString *toNSString(const UString& s)
     return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s.data()) length:s.size()];
 }
 
-NSString *toNSString(const SourceCode& s)
+static NSString *toNSString(const SourceCode& s)
 {
     if (!s.length())
         return nil;