From: Diego Nieto Cid <[email protected]>

    ../../nfsd/loop.c: In function 'server_loop':
    ../../nfsd/loop.c:41:12: warning: cast from pointer to integer of different 
size [-Wpointer-to-int-cast]

    ../../nfsd/main.c: In function 'create_server_thread':
    ../../nfsd/main.c:47:54: warning: cast to pointer from integer of different 
size [-Wint-to-pointer-cast]
---
 nfsd/loop.c | 2 +-
 nfsd/main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nfsd/loop.c b/nfsd/loop.c
index e04446e2..8e3ab251 100644
--- a/nfsd/loop.c
+++ b/nfsd/loop.c
@@ -38,7 +38,7 @@
 void *
 server_loop (void *arg)
 {
-  int fd = (int) arg;
+  int fd = (intptr_t) arg;
   char buf[MAXIOSIZE];
   int xid;
   int *p, *r;
diff --git a/nfsd/main.c b/nfsd/main.c
index 3f1fa9a5..a02607c7 100644
--- a/nfsd/main.c
+++ b/nfsd/main.c
@@ -44,7 +44,7 @@ create_server_thread (int socket)
   pthread_t thread;
   int fail;
 
-  fail = pthread_create (&thread, NULL, server_loop, (void *) socket);
+  fail = pthread_create (&thread, NULL, server_loop, (void *)(intptr_t) 
socket);
   if (fail)
     error (1, fail, "Creating main server thread");
 
-- 
2.51.0


Reply via email to