summaryrefslogtreecommitdiff
path: root/orc-test/orctest.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-07-09 00:27:31 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-07-09 00:27:31 +0100
commitf11848eefbe6291cf593b0065b07499bad5ce5a4 (patch)
treecb3740b1362ac8dd12c77881666e2c158c8db376 /orc-test/orctest.c
parent58f5cbe577da87406ea03e7fabd38d03eae072db (diff)
downloadorc-f11848eefbe6291cf593b0065b07499bad5ce5a4.tar.gz
Fix a bunch of unused-but-set-variable compiler warnings with gcc 4.6
Which cause compilation with -Werror to fail.
Diffstat (limited to 'orc-test/orctest.c')
-rw-r--r--orc-test/orctest.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/orc-test/orctest.c b/orc-test/orctest.c
index 061bb78..71c701f 100644
--- a/orc-test/orctest.c
+++ b/orc-test/orctest.c
@@ -21,6 +21,12 @@
#define MIN_NONDENORMAL (1.1754944909521339405e-38)
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define ORC_GNUC_UNUSED __attribute__((__unused__))
+#else
+#define ORC_GNUC_UNUSED
+#endif
+
void _orc_profile_init(void);
OrcRandomContext rand_context;
@@ -535,7 +541,7 @@ orc_test_compare_output_full (OrcProgram *program, int flags)
int i;
int j;
int k;
- int have_dest = FALSE;
+ int have_dest ORC_GNUC_UNUSED = FALSE;
OrcCompileResult result;
int have_acc = FALSE;
int acc_exec = 0, acc_emul = 0;
@@ -776,7 +782,7 @@ orc_test_get_program_for_opcode (OrcStaticOpcode *opcode)
{
OrcProgram *p;
char s[40];
- int flags = 0;
+ int flags ORC_GNUC_UNUSED = 0;
int args[4] = { -1, -1, -1, -1 };
int n_args = 0;
@@ -833,7 +839,7 @@ orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode)
OrcProgram *p;
char s[40];
int args[4] = { -1, -1, -1, -1 };
- int flags;
+ int flags ORC_GNUC_UNUSED;
int n_args = 0;
p = orc_program_new ();
@@ -882,7 +888,7 @@ orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode)
OrcProgram *p;
char s[40];
int args[4] = { -1, -1, -1, -1 };
- int flags;
+ int flags ORC_GNUC_UNUSED;
int n_args = 0;
if (opcode->src_size[1] == 0) {