What changed, and why it matters
This is a minor code cleanup that moves preprocessor guards (#if defined __i386 || defined __x86_64__) so that two x86-only byte arrays are only compiled on x86 platforms. It eliminates a compiler warning about unused constant variables on non-x86 builds and has no security relevance.
No security action required. Treat as routine build warning cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit restructures conditional compilation in src/crypto/CryptonightR_JIT.c. Previously, the static const arrays ‘prologue’ and ‘epilogue’ were declared unconditionally but their byte contents were wrapped in #if/#endif, leaving the arrays empty on non-x86 platforms and triggering ‘unused-const-variable’ warnings. The patch moves the #if guard to enclose the entire array declarations and the matching #endif to after the epilogue array. This is a warning-fix/refactoring change with no functional or security impact.
Changed components
src/crypto/CryptonightR_JIT.cInspect captured patch +2 / −4
diff --git a/src/crypto/CryptonightR_JIT.c b/src/crypto/CryptonightR_JIT.c
index ffe7820..b59af8c 100644
--- a/src/crypto/CryptonightR_JIT.c
+++ b/src/crypto/CryptonightR_JIT.c
@@ -14,8 +14,8 @@
#include "CryptonightR_JIT.h"
#include "CryptonightR_template.h"
-static const uint8_t prologue[] = {
#if defined __i386 || defined __x86_64__
+static const uint8_t prologue[] = {
0x4C, 0x8B, 0xD7, // mov r10, rdi
0x53, // push rbx
0x55, // push rbp
@@ -30,11 +30,9 @@ static const uint8_t prologue[] = {
0x41, 0x8B, 0x42, 0x18, // mov eax, DWORD PTR [r10+24]
0x41, 0x8B, 0x52, 0x1C, // mov edx, DWORD PTR [r10+28]
0x45, 0x8B, 0x4A, 0x20, // mov r9d, DWORD PTR [r10+32]
-#endif
};
static const uint8_t epilogue[] = {
-#if defined __i386 || defined __x86_64__
0x49, 0x8B, 0xE3, // mov rsp, r11
0x41, 0x89, 0x1A, // mov DWORD PTR [r10], ebx
0x41, 0x89, 0x72, 0x04, // mov DWORD PTR [r10+4], esi
@@ -44,8 +42,8 @@ static const uint8_t epilogue[] = {
0x5D, // pop rbp
0x5B, // pop rbx
0xC3, // ret
-#endif
};
+#endif
#define APPEND_CODE(src, size) \
do { \
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.