RESOLVED FIXED 145759
[GTK] Fix parentheses warning in TestWebKitWebView.cpp
https://bugs.webkit.org/show_bug.cgi?id=145759
Summary [GTK] Fix parentheses warning in TestWebKitWebView.cpp
Csaba Osztrogonác
Reported 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.
Attachments
Patch (1.45 KB, patch)
2015-06-08 08:55 PDT, Csaba Osztrogonác
no flags
Csaba Osztrogonác
Comment 1 2015-06-08 08:55:50 PDT
WebKit Commit Bot
Comment 2 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>
WebKit Commit Bot
Comment 3 2015-06-08 09:49:02 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.