On 06/10/2025 08:31, Diego Nieto Cid wrote:
Hello,

So in the hurd package build log there appears this couple of log
messages:

     ../../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]
        41 |   int fd = (int) arg;
           |            ^

     ../../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]
        47 |   fail = pthread_create (&thread, NULL, server_loop, (void *) 
socket);
           |

Is there really no way to get this warning fixed? It looks like the standard
way of passing generic arguments to a thread function. So we'll probable need
to live with it.


AFAIK those should be coded like this:

main.c:
   fail = pthread_create (&thread, NULL, server_loop, &socket);

loop.c:
   int fd = *( (int *) arg);


HTH
Amos


Reply via email to