From 1e303601a7355fb8282f0fcc3a8c4e86de944448 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 29 Nov 2016 12:38:51 +0100 Subject: Fix warnings in tests (MinGW/MSCV) tst_qtcpsocket.cpp:606:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tst_qtcpsocket.cpp:670:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tst_qfile.cpp(2661): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) tst_qarraydata.cpp(760): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) main.cpp:40:33: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result] Change-Id: I80ccef29b71af6a2c3d45a79aedaeb37f49bba72 Reviewed-by: Marc Mutz Reviewed-by: Frederik Gladhorn --- tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/other') diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp index 46002dd326..5e75f7db3c 100644 --- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp +++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp @@ -37,7 +37,9 @@ int main(int, char **argv) fflush(stdout); // wait for a newline - fgets(buf, sizeof buf, stdin); + const char *result = fgets(buf, sizeof buf, stdin); + if (result != buf) + return -1; puts(msg); fflush(stdout); -- cgit v1.2.3