From 69cc279177e148eacc02a2649428bb19f87b6c8a Mon Sep 17 00:00:00 2001 From: amirhosein soofi Date: Sat, 2 Aug 2025 16:13:36 +0330 Subject: [PATCH 1/2] Fix GCC compilation error: Update function declaration to match implementation - Fix variable length array parameter mismatch in dexInstr_getVarArgs - Update header declaration from u4[] to u4[kMaxVarArgRegs] to match implementation - Resolves compilation error with newer GCC versions that treat VLA parameters as errors - Fixes issue #XX: GCC compilation fails with -Werror=vla-parameter --- src/dex_instruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dex_instruction.h b/src/dex_instruction.h index 204d6e6..022513a 100644 --- a/src/dex_instruction.h +++ b/src/dex_instruction.h @@ -275,7 +275,7 @@ s4 dexInstr_getVRegH(u2 *); u2 dexInstr_getVRegH_45cc(u2 *); u2 dexInstr_getVRegH_4rcc(u2 *); bool dexInstr_hasVarArgs(u2 *); -void dexInstr_getVarArgs(u2 *, u4[]); +void dexInstr_getVarArgs(u2 *, u4[kMaxVarArgRegs]); // Set register functions void dexInstr_SetVRegA_10x(u2 *, u1); From e72e6a87dcfea8f1774facb41019665e67785a69 Mon Sep 17 00:00:00 2001 From: amirhosein soofi Date: Sat, 2 Aug 2025 16:30:44 +0330 Subject: [PATCH 2/2] Fix GCC compilation error: Update function declaration to match implementation --- src/dex_instruction.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dex_instruction.h b/src/dex_instruction.h index 204d6e6..3a0dfff 100644 --- a/src/dex_instruction.h +++ b/src/dex_instruction.h @@ -275,7 +275,7 @@ s4 dexInstr_getVRegH(u2 *); u2 dexInstr_getVRegH_45cc(u2 *); u2 dexInstr_getVRegH_4rcc(u2 *); bool dexInstr_hasVarArgs(u2 *); -void dexInstr_getVarArgs(u2 *, u4[]); +void dexInstr_getVarArgs(u2 *, u4[kMaxVarArgRegs]); // Set register functions void dexInstr_SetVRegA_10x(u2 *, u1); @@ -302,3 +302,4 @@ extern const char *const kInstructionNames[]; extern instrDesc_t const kInstructionDescriptors[]; #endif +