pseudo_rand implicit declaration when undef USE_CANDLE_MODE
Bug #1930468 reported by
Rob Carlson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Flashlight Firmware Repository |
New
|
Undecided
|
Unassigned |
Bug Description
anduril2 591
If using #undef USE_CANDLE_MODE in config-default.h, aux-capable Emisar/Noctigon builds fail with message:
In file included from anduril.c:161:0:
aux-leds.c: In function ‘rgb_led_update’:
aux-leds.c:115:34: warning: implicit declaration of function ‘pseudo_rand’ [-Wimplicit-
rainbow = (rainbow + 1 + pseudo_rand() % 5) % 6;
anduril.o: In function `rgb_led_update':
anduril2/
Adding statement #define USE_PSEUDO_RAND to config-default.h immediately after the undef fixes build issues.
To post a comment you must log in.
I think that proper way for now is:
diff --git a/spaghetti- monster/ anduril/ strobe- modes-fsm. h b/spaghetti- monster/ anduril/ strobe- modes-fsm. h monster/ anduril/ strobe- modes-fsm. h monster/ anduril/ strobe- modes-fsm. h
index 7087796..0c319d2 100644
--- a/spaghetti-
+++ b/spaghetti-
@@ -21,7 +21,7 @@
#define STROBE_MODES_FSM_H
// enable the random number generator if we need it USE_LIGHTNING_ MODE) || defined( USE_CANDLE_ MODE) USE_LIGHTNING_ MODE) || defined( USE_CANDLE_ MODE) || defined( USE_AUX_ RGB_LEDS)
-#if defined(
+#if defined(
#define USE_PSEUDO_RAND
#endif