From 42150430ce7cbcee73173c7b8302c24f2efbae76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 15 Jun 2010 11:40:38 +0200 Subject: [PATCH] tests: Fix compilation of the ABI test on 64 bit architectures Casting a pointer to a plain int will cause a compiler error, use long instead. --- testsuite/abi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/abi.c b/testsuite/abi.c index f03a7b3..553c8fa 100644 --- a/testsuite/abi.c +++ b/testsuite/abi.c @@ -10,11 +10,11 @@ int main (int argc, char *argv[]) { - int offset; + long offset; int expected_offset; int error = 0; - offset = ((int) ((unsigned char *) &((OrcProgram*) 0)->code_exec)); + offset = ((long) ((unsigned char *) &((OrcProgram*) 0)->code_exec)); if (sizeof(void *) == 4) { expected_offset = 8360; @@ -23,7 +23,7 @@ int main (int argc, char *argv[]) } if (offset != expected_offset) { - printf("ABI bug: OrcProgram->code_exec should be at offset %d instead of %d\n", + printf("ABI bug: OrcProgram->code_exec should be at offset %ld instead of %d\n", offset, expected_offset); error = 1; } -- 2.7.4