Bug 145759

Summary: [GTK] Fix parentheses warning in TestWebKitWebView.cpp
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 145121    
Attachments:
Description Flags
Patch none

Description Csaba Osztrogonác 2015-06-08 08:54:45 PDT
clang build log:
-----------------
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:478:22: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    while (readBytes = g_input_stream_read(test->m_inputStream.get(), &buffer, 512, 0, &error.outPtr())) {
           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:478:22: note: place parentheses around the assignment to silence this warning
    while (readBytes = g_input_stream_read(test->m_inputStream.get(), &buffer, 512, 0, &error.outPtr())) {
                     ^
           (                                                                                           )
../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:478:22: note: use '==' to turn this assignment into an equality comparison
    while (readBytes = g_input_stream_read(test->m_inputStream.get(), &buffer, 512, 0, &error.outPtr())) {
                     ^
                     ==
1 warning generated.


It isn't a bug, but a valid assignment, so we should use double parentheses to silence this warning.
Comment 1 Csaba Osztrogonác 2015-06-08 08:55:50 PDT
Created attachment 254494 [details]
Patch
Comment 2 WebKit Commit Bot 2015-06-08 09:48:58 PDT
Comment on attachment 254494 [details]
Patch

Clearing flags on attachment: 254494

Committed r185321: <http://trac.webkit.org/changeset/185321>
Comment 3 WebKit Commit Bot 2015-06-08 09:49:02 PDT
All reviewed patches have been landed.  Closing bug.