Skip to content

Commit 52e9443

Browse files
committed
altos/telefire: Add cast to AO_LED_CONTINUITY to eliminate -Wconversion warning
All of these products had the same warning. Signed-off-by: Keith Packard <[email protected]>
1 parent 877d464 commit 52e9443

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/telefireeight-v1.0/ao_pins.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
#define LED_7_PORT (&stm_gpioa)
132132
#define LED_7_PIN 10
133133

134-
#define AO_LED_CONTINUITY(c) (1 << (c))
134+
#define AO_LED_CONTINUITY(c) ((AO_LED_TYPE) (1 << (c)))
135135
#define AO_LED_CONTINUITY_MASK (0xff)
136136

137137
/* ARM */

src/telefireeight-v2.0/ao_pins.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
#define LED_7_PORT (&stm_gpioa)
117117
#define LED_7_PIN 10
118118

119-
#define AO_LED_CONTINUITY(c) (1 << (c))
119+
#define AO_LED_CONTINUITY(c) ((AO_LED_TYPE) (1 << (c)))
120120
#define AO_LED_CONTINUITY_MASK (0xff)
121121

122122
/* ARM */

src/telefireone-v1.0/ao_pins.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
#define LED_PIN_ARMED 5
154154

155155
#define AO_LED_ARMED (1 << LED_PIN_ARMED)
156-
#define AO_LED_CONTINUITY(c) (1 << (4 - (c)))
156+
#define AO_LED_CONTINUITY(c) ((AO_LED_TYPE) (1 << (4 - (c))))
157157
#define AO_LED_CONTINUITY_MASK (0x1 << 4)
158158

159159
#define LEDS_AVAILABLE (LED_PORT_0_MASK|LED_PORT_1_MASK)

src/telefiretwo-v0.1/ao_pins.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
#define LED_PIN_ARMED 5
142142

143143
#define AO_LED_ARMED (1 << LED_PIN_ARMED)
144-
#define AO_LED_CONTINUITY(c) (1 << (4 - (c)))
144+
#define AO_LED_CONTINUITY(c) ((AO_LED_TYPE) (1 << (4 - (c))))
145145
#define AO_LED_CONTINUITY_MASK (0x3 << 3)
146146

147147
#define LEDS_AVAILABLE (LED_PORT_0_MASK|LED_PORT_1_MASK)

0 commit comments

Comments
 (0)