From 83b4a6b8438e282c1b109e08b66f7e067c08a601 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Thu, 23 Jul 2015 10:54:36 -0400
Subject: [PATCH] Process: Fix conversion warning in testProcess.c

Store and pass the interruptDelay parameter as 'unsigned int' so
it does not have to be converted to pass to testProcess_sleep.
Otherwise some compilers warn about the signed->unsigned conversion.

Change-Id: I1edf6dbc852231834a5de82c5b14f84ac8018c1f
---
 testProcess.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/testProcess.c b/testProcess.c
index a9268daf..d0e20c1f 100644
--- a/testProcess.c
+++ b/testProcess.c
@@ -70,7 +70,7 @@ static void testProcess_sleep(unsigned int sec)
 int runChild(const char* cmd[], int state, int exception, int value,
              int share, int output, int delay, double timeout, int poll,
              int repeat, int disown, int createNewGroup,
-             int interruptDelay);
+             unsigned int interruptDelay);
 
 static int test1(int argc, const char* argv[])
 {
@@ -360,7 +360,8 @@ static int test10_grandchild(int argc, const char* argv[])
 static int runChild2(kwsysProcess* kp,
               const char* cmd[], int state, int exception, int value,
               int share, int output, int delay, double timeout,
-              int poll, int disown, int createNewGroup, int interruptDelay)
+              int poll, int disown, int createNewGroup,
+              unsigned int interruptDelay)
 {
   int result = 0;
   char* data = 0;
@@ -542,7 +543,7 @@ static int runChild2(kwsysProcess* kp,
 int runChild(const char* cmd[], int state, int exception, int value,
              int share, int output, int delay, double timeout,
              int poll, int repeat, int disown, int createNewGroup,
-             int interruptDelay)
+             unsigned int interruptDelay)
 {
   int result = 1;
   kwsysProcess* kp = kwsysProcess_New();
@@ -661,7 +662,7 @@ int main(int argc, const char* argv[])
     int polls[10] = {0, 0, 0, 0, 0, 0, 1, 0, 0, 0};
     int repeat[10] = {2, 1, 1, 1, 1, 1, 1, 1, 1, 1};
     int createNewGroups[10] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
-    int interruptDelays[10] = {0, 0, 0, 0, 0, 0, 0, 0, 3, 2};
+    unsigned int interruptDelays[10] = {0, 0, 0, 0, 0, 0, 0, 0, 3, 2};
     int r;
     const char* cmd[4];
 #ifdef _WIN32
-- 
GitLab