wininet/tests: fix a compiler warning on LLVM/Clang

Austin English austinenglish at gmail.com
Mon May 14 01:19:09 CDT 2012


clang -c -I. -I. -I../../../include -I../../../include
-DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION  -D_REENTRANT
-fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement
-Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits
-Wwrite-strings -fno-omit-frame-pointer -Wpointer-arith
-I/usr/include/freetype2    -g -O0 -std=gnu89  -o http.o http.c
http.c:212:52: warning: use of logical '||' with constant operand
[-Wconstant-logical-operand]
    res = HttpQueryInfo(req,
HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_NUMBER, &code, &size, &index);
                                                   ^ ~~~~~~~~~~~~~~~~~~~~~~
http.c:212:52: note: use '|' for a bitwise operation
    res = HttpQueryInfo(req,
HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_NUMBER, &code, &size, &index);
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~
                                                   |
http.c:218:52: warning: use of logical '||' with constant operand
[-Wconstant-logical-operand]
    res = HttpQueryInfo(req,
HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_REQUEST_HEADERS, &code, &size,
NULL);
                                                   ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http.c:218:52: note: use '|' for a bitwise operation
    res = HttpQueryInfo(req,
HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_REQUEST_HEADERS, &code, &size,
NULL);

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                   |
-- 
-Austin
-------------- next part --------------
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 6be48a3..ce2e849 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -209,13 +209,13 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode)
     code = 0xdeadbeef;
     index = 1;
     size = sizeof(code);
-    res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_NUMBER, &code, &size, &index);
+    res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &code, &size, &index);
     ok_(__FILE__,line)(!res && GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND,
                        "HttpQueryInfo failed: %x(%d)\n", res, GetLastError());
 
     code = 0xdeadbeef;
     size = sizeof(code);
-    res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_REQUEST_HEADERS, &code, &size, NULL);
+    res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_REQUEST_HEADERS, &code, &size, NULL);
     ok_(__FILE__,line)(!res && GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND,
                        "HttpQueryInfo failed: %x(%d)\n", res, GetLastError());
 }


More information about the wine-patches mailing list