Browse Source

fix warnings on 64bit hosts

Mike Frysinger 18 years ago
parent
commit
411770715d
2 changed files with 5 additions and 5 deletions
  1. 4 4
      test/pthread/ex3.c
  2. 1 1
      test/pthread/ex7.c

+ 4 - 4
test/pthread/ex3.c

@@ -23,8 +23,8 @@ volatile int started;
 
 int main(int argc, char ** argv)
 {
-  int i;
-  int pid;
+  unsigned long i;
+  unsigned long pid;
 
   /* create a number to search for */
   pid = getpid();
@@ -66,8 +66,8 @@ void print_it(void *arg)
 
 void *search(void *arg)
 {
-  int num = (int) arg;
-  int i, j, ntries;
+  unsigned long num = (unsigned long) arg;
+  unsigned long i, j, ntries;
   pthread_t tid;
 
   /* get the calling thread ID */

+ 1 - 1
test/pthread/ex7.c

@@ -25,7 +25,7 @@ event_t main_event;
 void *
 test_thread (void *ms_param)
 {
-    int status = 0;
+    unsigned long status = 0;
     event_t foo;
     struct timespec time;
     struct timeval  now;