commit e25960c

Saagar Jha  ·  2023-05-07 11:19:37 +0000 UTC
parent 578c94b
Fix pointer-to-int cast

Resolves "warning: performing pointer subtraction with a null pointer
has undefined behavior [-Wnull-pointer-subtraction]"
1 files changed,  +1, -1
+1, -1
1@@ -366,7 +366,7 @@ void job_wait(xs_val **job)
2 static void *job_thread(void *arg)
3 /* job thread */
4 {
5-    int pid = (char *) arg - (char *) 0x0;
6+    int pid = (int)(uintptr_t)arg;
7 
8     srv_debug(1, xs_fmt("job thread %d started", pid));
9