[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ossy at webkit.org ossy at webkit.org
Wed Dec 22 13:11:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e89e74de64fa11c9e5b5e4b175b957c2d72c44ef
Author: ossy at webkit.org <ossy at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 8 15:11:42 2010 +0000

    Fix ignoring return value warning in case of gcc 4.4.4
    https://bugs.webkit.org/show_bug.cgi?id=45384
    
    Patch by Peter Varga <pvarga at inf.u-szeged.hu> on 2010-09-08
    Reviewed by Kenneth Rohde Christiansen.
    
    * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
    (testPostURLFile):
    If fwrite have written zero byte then the testPostURLFile function
    returns with false as tempFile can't be opened.
    * DumpRenderTree/qt/ImageDiff.cpp:
    (main):
    Put fwrite function into an if condition without body to avoid
    warning. It is safe because this function writes to the stdout.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4eee078..ad9db60 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-08  Peter Varga  <pvarga at inf.u-szeged.hu>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Fix ignoring return value warning in case of gcc 4.4.4
+        https://bugs.webkit.org/show_bug.cgi?id=45384
+
+        * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
+        (testPostURLFile):
+        If fwrite have written zero byte then the testPostURLFile function
+        returns with false as tempFile can't be opened.
+        * DumpRenderTree/qt/ImageDiff.cpp:
+        (main):
+        Put fwrite function into an if condition without body to avoid
+        warning. It is safe because this function writes to the stdout.
+
 2010-09-08  Satish Sampath  <satish at chromium.org>
 
         Unreviewed, adding myself to committers list.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
index 44fafa1..5002400 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
@@ -690,7 +690,9 @@ static bool testPostURLFile(PluginObject* obj, const NPVariant* args, uint32_t a
     if (!tempFile)
         return false;
 
-    fwrite(contentsString.UTF8Characters, contentsString.UTF8Length, 1, tempFile);
+    if (!fwrite(contentsString.UTF8Characters, contentsString.UTF8Length, 1, tempFile))
+        return false;
+
     fclose(tempFile);
 
     NPError error = browser->posturl(obj->npp, url, target, pathString.UTF8Length, path, TRUE);
diff --git a/WebKitTools/DumpRenderTree/qt/ImageDiff.cpp b/WebKitTools/DumpRenderTree/qt/ImageDiff.cpp
index 8ee68db..9282e2f 100644
--- a/WebKitTools/DumpRenderTree/qt/ImageDiff.cpp
+++ b/WebKitTools/DumpRenderTree/qt/ImageDiff.cpp
@@ -132,7 +132,10 @@ int main(int argc, char* argv[])
                     buffer.close();
                     const QByteArray &data = buffer.data();
                     printf("Content-Length: %lu\n", static_cast<unsigned long>(data.length()));
-                    fwrite(data.constData(), 1, data.length(), stdout);
+
+                    // We have to use the return value of fwrite to avoid "ignoring return value" gcc warning
+                    // See https://bugs.webkit.org/show_bug.cgi?id=45384 for details.
+                    if (fwrite(data.constData(), 1, data.length(), stdout)) {}
 
                     fprintf(stdout, "diff: %01.2f%% failed\n", difference);
                 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list