src/x86/ffiw64.c: Don't assign a "char *" to an "unsigned char *"
authorJosh Triplett <josh@joshtriplett.org>
Sun, 26 Jul 2015 23:23:55 +0000 (16:23 -0700)
committerJosh Triplett <josh@joshtriplett.org>
Mon, 27 Jul 2015 00:18:16 +0000 (17:18 -0700)
Declare a local variable to match the type of the struct field assigned
to it, rather than adding unsigned to the type.  Fixes a -Wpointer-sign
warning.

src/x86/ffiw64.c

index 8a33a6c..31e1d19 100644 (file)
@@ -190,7 +190,7 @@ ffi_prep_closure_loc (ffi_closure* closure,
     /* nopl  (%rax) */
     0x0f, 0x1f, 0x00
   };
-  unsigned char *tramp = closure->tramp;
+  char *tramp = closure->tramp;
 
   if (cif->abi != FFI_WIN64)
     return FFI_BAD_ABI;