<http://webkit.org/b/56688> Fix clang static analyzer warning in WebCoreViewFactory.m
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Mar 2011 03:58:46 +0000 (03:58 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Mar 2011 03:58:46 +0000 (03:58 +0000)
Reviewed by Anders Carlsson.

Fixes the following static analyzer warning:

    Source/WebCore/page/mac/WebCoreViewFactory.m:45:5: warning: Returning 'self' while it is not set to the result of '[(super or self) init...]'
         return self;
         ^

* page/mac/WebCoreViewFactory.m:
(-[WebCoreViewFactory init]): Assign the result of [super init]
to self.

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

Source/WebCore/ChangeLog
Source/WebCore/page/mac/WebCoreViewFactory.m

index 13a8ca9..d399945 100644 (file)
@@ -1,3 +1,19 @@
+2011-03-18  David Kilzer  <ddkilzer@apple.com>
+
+        <http://webkit.org/b/56688> Fix clang static analyzer warning in WebCoreViewFactory.m
+
+        Reviewed by Anders Carlsson.
+
+        Fixes the following static analyzer warning:
+
+            Source/WebCore/page/mac/WebCoreViewFactory.m:45:5: warning: Returning 'self' while it is not set to the result of '[(super or self) init...]'
+                 return self;
+                 ^
+
+        * page/mac/WebCoreViewFactory.m:
+        (-[WebCoreViewFactory init]): Assign the result of [super init]
+        to self.
+
 2011-03-18  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Dimitri Glazkov.
index 5398989..17a7a29 100644 (file)
@@ -37,7 +37,7 @@ static WebCoreViewFactory *sharedFactory;
 
 - init
 {
-    [super init];
+    self = [super init];
     
     ASSERT(!sharedFactory);
     sharedFactory = [self retain];