Răsfoiți Sursa

debug-engine: constify several global variables (#1427)

YAMAMOTO Takashi 3 ani în urmă
părinte
comite
fba12e9969

+ 1 - 1
core/iwasm/libraries/debug-engine/debug_engine.c

@@ -11,7 +11,7 @@
 #include "wasm_opcode.h"
 #include "wasm_runtime.h"
 
-static uint8 break_instr[] = { DEBUG_OP_BREAK };
+static const uint8 break_instr[] = { DEBUG_OP_BREAK };
 
 typedef struct WASMDebugEngine {
     struct WASMDebugEngine *next;

+ 1 - 1
core/iwasm/libraries/debug-engine/gdbserver.c

@@ -18,7 +18,7 @@ struct packet_handler_elem {
 
 #define DEL_HANDLER(r, h) [r] = { .request = r, .handler = h }
 
-static struct packet_handler_elem packet_handler_table[255] = {
+static const struct packet_handler_elem packet_handler_table[255] = {
     DEL_HANDLER('Q', handle_general_set),
     DEL_HANDLER('q', handle_general_query),
     DEL_HANDLER('v', handle_v_packet),