drivers: Use 'main_value' instead of 'main'
authorKeith Packard <keithp@keithp.com>
Mon, 16 Sep 2019 00:05:59 +0000 (17:05 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 16 Sep 2019 00:05:59 +0000 (17:05 -0700)
GCC can emit a warning when programs redefine 'main'.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_aprs.c

index 2f17d04..bc5c29d 100644 (file)
@@ -527,7 +527,7 @@ static int tncComment(uint8_t *buf)
        int16_t apogee = ao_ignite_decivolt(AO_SENSE_DROGUE(&packet));
 #endif
 #ifdef AO_SENSE_MAIN
-       int16_t main = ao_ignite_decivolt(AO_SENSE_MAIN(&packet));
+       int16_t main_value = ao_ignite_decivolt(AO_SENSE_MAIN(&packet));
 #endif
 
        return sprintf((char *) buf,
@@ -548,8 +548,8 @@ static int tncComment(uint8_t *buf)
                       apogee%10
 #endif
 #ifdef AO_SENSE_MAIN
-                      , main/10,
-                      main%10
+                      , main_value/10,
+                      main_value%10
 #endif
                       , ao_serial_number
                );