fix: warning: old-style function definition
What changed, and why it matters
This commit only fixes compiler warnings by adding the word 'void' inside empty parentheses of three C function definitions. In C, empty parentheses mean something slightly different than '(void)', so modern compilers warn about it. This is a code-quality cleanup with no security effect.
No security action needed; treat as routine code hygiene.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes three function definitions in src/crypto/rx-slow-hash.c from old-style K&R empty parameter lists ‘()’ to explicit ‘(void)’ parameter lists: rx_get_miner_thread, rx_slow_hash_allocate_state, and rx_slow_hash_free_state. This suppresses ‘-Wold-style-declaration’ / ‘-Wstrict-prototypes’ warnings but does not alter program behavior, calling conventions, memory handling, or consensus logic.
Changed components
src/crypto/rx-slow-hash.cInspect captured patch +3 / −3
diff --git a/src/crypto/rx-slow-hash.c b/src/crypto/rx-slow-hash.c
index d5bce71..1dc3eb2 100644
--- a/src/crypto/rx-slow-hash.c
+++ b/src/crypto/rx-slow-hash.c
@@ -504,11 +504,11 @@ void rx_set_miner_thread(uint32_t value, size_t max_dataset_init_threads) {
CTHR_RWLOCK_UNLOCK_WRITE(main_dataset_lock);
}
-uint32_t rx_get_miner_thread() {
+uint32_t rx_get_miner_thread(void) {
return miner_thread;
}
-void rx_slow_hash_allocate_state() {}
+void rx_slow_hash_allocate_state(void) {}
static void rx_destroy_vm(randomx_vm** vm) {
if (*vm) {
@@ -517,7 +517,7 @@ static void rx_destroy_vm(randomx_vm** vm) {
}
}
-void rx_slow_hash_free_state() {
+void rx_slow_hash_free_state(void) {
rx_destroy_vm(&main_vm_full);
rx_destroy_vm(&main_vm_light);
rx_destroy_vm(&secondary_vm_light);
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.