[Mac] PasteboardMac.mm build fails
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 02:20:19 +0000 (02:20 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 02:20:19 +0000 (02:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78655

Reviewed by Hajime Morita.

Although the bots have been working fine, PasteboardMac.mm build fails
in our local Mac environments due to an uninitialized variable:

    /Users/haraken/WebKit/Source/WebCore/platform/mac/PasteboardMac.mm:322: warning: 'string' may be used uninitialized in this function

This patch initializes the 'string' to nil to fix the build failure.

No tests. No change in behavior.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::plainText):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/PasteboardMac.mm

index 9975c00..9b5b2f4 100644 (file)
@@ -1,3 +1,22 @@
+2012-02-14  Kentaro Hara  <haraken@chromium.org>
+
+        [Mac] PasteboardMac.mm build fails
+        https://bugs.webkit.org/show_bug.cgi?id=78655
+
+        Reviewed by Hajime Morita.
+
+        Although the bots have been working fine, PasteboardMac.mm build fails
+        in our local Mac environments due to an uninitialized variable:
+
+            /Users/haraken/WebKit/Source/WebCore/platform/mac/PasteboardMac.mm:322: warning: 'string' may be used uninitialized in this function
+
+        This patch initializes the 'string' to nil to fix the build failure.
+
+        No tests. No change in behavior.
+
+        * platform/mac/PasteboardMac.mm:
+        (WebCore::Pasteboard::plainText):
+
 2012-02-14  Kenichi Ishibashi  <bashi@chromium.org>
 
         [WebSocket] Add extension attribute support
index 698e220..6c32214 100644 (file)
@@ -319,7 +319,7 @@ String Pasteboard::plainText(Frame* frame)
         return [(NSString *)platformStrategies()->pasteboardStrategy()->stringForType(NSStringPboardType, m_pasteboardName) precomposedStringWithCanonicalMapping];
     
     NSAttributedString *attributedString = nil;
-    NSString *string;
+    NSString *string = nil;
 
     if (types.contains(String(NSRTFDPboardType))) {
         RefPtr<SharedBuffer> data = platformStrategies()->pasteboardStrategy()->bufferForType(NSRTFDPboardType, m_pasteboardName);