gdbserver/ax.c: resolve compiler warning
Commit Message
gdbserver/ax.c defines unconditionally "static const unsigned char
gdb_agent_op_sizes[]", but uses it, only when "#ifndef
IN_PROCESS_AGENT". This leads to compiler warning of type "unused".
This patch moves the above definition within "#ifndef IN_PROCESS_AGENT".
static const char *
@@ -89,6 +81,14 @@ gdb_agent_op_name (int op)
#ifndef IN_PROCESS_AGENT
+static const unsigned char gdb_agent_op_sizes [gdb_agent_op_last] =
+ {
+ 0
+#define DEFOP(NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED, VALUE) , SIZE
+#include "ax.def"
+#undef DEFOP
+ };
+
/* The packet form of an agent expression consists of an 'X', number
of bytes in expression, a comma, and then the bytes. */
@@ -69,14 +69,6 @@ static const char *gdb_agent_op_names
[gdb_agent_op_last] =
#undef DEFOP
};
-static const unsigned char gdb_agent_op_sizes [gdb_agent_op_last] =
- {
- 0
-#define DEFOP(NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED, VALUE) , SIZE
-#include "ax.def"
-#undef DEFOP
- };
-
/* A wrapper for gdb_agent_op_names that does some bounds-checking. */