ffi_test.c: Casting a 32bit int to a 64bit pointer is invalid. Instead,
cast it to a 64bit int then to the pointer. Found with visual studio 2015.db4
parent
f26c7fc66d
commit
a83df49ecc
|
@ -334,7 +334,7 @@ struct ulonglong_pair ffi_test_63() {
|
|||
}
|
||||
|
||||
void* bug1021_test_1(void* x, int y) {
|
||||
return (void*)((y * y) + (long)x);
|
||||
return (void*)(y * y + (size_t)x);
|
||||
}
|
||||
|
||||
int bug1021_test_2(int x, char *y, void *z) {
|
||||
|
@ -342,5 +342,5 @@ int bug1021_test_2(int x, char *y, void *z) {
|
|||
}
|
||||
|
||||
void* bug1021_test_3(int x) {
|
||||
return (void*)((long)x);
|
||||
return (void*)(size_t)((long)x);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue