From: Sebastian Dröge Date: Tue, 15 Jun 2010 09:40:38 +0000 (+0200) Subject: tests: Fix compilation of the ABI test on 64 bit architectures X-Git-Tag: orc-0.4.6~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42150430ce7cbcee73173c7b8302c24f2efbae76;p=platform%2Fupstream%2Forc.git 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. --- 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; }