From 93893539719e39df21b00676968b65cd1652b8af Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 15 May 2014 21:04:37 +0800 Subject: [PATCH] tests: fix warnings caused by unused variable/function in test_skipdata.c --- tests/test_skipdata.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_skipdata.c b/tests/test_skipdata.c index 8357b665..2c76a796 100644 --- a/tests/test_skipdata.c +++ b/tests/test_skipdata.c @@ -28,12 +28,17 @@ static void print_string_hex(unsigned char *str, int len) printf("\n"); } -static size_t mycallback(const uint8_t *buffer, size_t offset, void *p) +size_t mycallback(const uint8_t *buffer, size_t offset, void *p) { // always skip 2 bytes when encountering data return 2; } +cs_opt_skipdata skipdata = { + // rename default "data" instruction from ".byte" to "db" + "db", +}; + static void test() { #define X86_CODE32 "\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x00\x91\x92" @@ -61,10 +66,6 @@ static void test() cs_insn *insn; int i; size_t count; - cs_opt_skipdata skipdata = { - // rename default "data" instruction from ".byte" to "db" - "db", - }; cs_err err; for (i = 0; i < sizeof(platforms)/sizeof(platforms[0]); i++) {