diff --git a/tests/testing/TimeoutAqlTest.cpp b/tests/testing/TimeoutAqlTest.cpp
index c2d8a650c95776666150f2da9d4ba0d8094dfaf7..112440eb96c04b4b95154d6f8c5ab7eea1898723 100644
--- a/tests/testing/TimeoutAqlTest.cpp
+++ b/tests/testing/TimeoutAqlTest.cpp
@@ -47,7 +47,7 @@ std::string readFromFD ( int fd ) {
 	static const size_t BUFSIZE = 64;
 
 	std::string res;
-	int rd;
+	ssize_t rd;
 	std::array < char, BUFSIZE > buf;
 
 	while ( ( rd = read ( fd, buf.data ( ), buf.size ( ) - 1 ) ) > 0 ) {