[PATCH xorg-gtest 4/4] process: fix compiler warning

Peter Hutterer peter.hutterer at who-t.net
Mon Sep 24 17:34:56 PDT 2012


../src/process.cpp: In member function ‘bool
xorg::testing::Process::WaitForExit(unsigned int)’:
../src/process.cpp:130:33: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/process.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/process.cpp b/src/process.cpp
index 57ee35e..4deea14 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -127,7 +127,7 @@ void xorg::testing::Process::Start(const std::string& program, ...) {
 }
 
 bool xorg::testing::Process::WaitForExit(unsigned int timeout) {
-  for (int i = 0; i < timeout * 100; i++) {
+  for (unsigned int i = 0; i < timeout * 100; i++) {
     int status;
     int pid = waitpid(Pid(), &status, WNOHANG);
 
-- 
1.7.11.2



More information about the xorg-devel mailing list