]> git.lizzy.rs Git - plan9front.git/commitdiff
dtracy: avoid pointer to integer truncation warning on amd64
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sat, 15 Dec 2018 19:39:32 +0000 (20:39 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sat, 15 Dec 2018 19:39:32 +0000 (20:39 +0100)
sys/src/9/port/dtracysys.c

index 1e525052d52ad026fb32addd544d62eb359d498b..367f4738b7b430a98c3ad0c590528971c0969f30 100644 (file)
@@ -240,7 +240,7 @@ sysenable(DTProbe *p)
        int i;
        Syscall *z;
        
-       i = (int) p->aux;
+       i = (int)(uintptr)p->aux;
        assert(i >= 0 && i < nsyscall);
        if(dtpsysentry[i]->nenable + dtpsysreturn[i]->nenable == 0)
                z = systab[i], systab[i] = wraptab[i], wraptab[i] = z;
@@ -253,7 +253,7 @@ sysdisable(DTProbe *p)
        int i;
        Syscall *z;
        
-       i = (int) p->aux;
+       i = (int)(uintptr)p->aux;
        assert(i >= 0 && i < nsyscall);
        if(dtpsysentry[i]->nenable + dtpsysreturn[i]->nenable == 0)
                z = systab[i], systab[i] = wraptab[i], wraptab[i] = z;