summaryrefslogtreecommitdiff
path: root/src/stm
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-20 22:15:25 -0800
committerKeith Packard <keithp@keithp.com>2013-12-20 22:19:35 -0800
commitb31b4622d5bd92c0cc0851818f5b595dbdb60ead (patch)
tree7ce882a3f9a583903d2054471769a82e7c3de852 /src/stm
parent755082d36231c1b247bc0e1f13919dd9b5c362a8 (diff)
altos: Clean up some minor warnings from -Wall
Unused variables, functions and labels, missing enums in switch. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm')
-rw-r--r--src/stm/ao_adc_stm.c4
-rw-r--r--src/stm/ao_i2c_stm.c6
-rw-r--r--src/stm/ao_usb_stm.c4
3 files changed, 3 insertions, 11 deletions
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c
index 53f19b40..505addfa 100644
--- a/src/stm/ao_adc_stm.c
+++ b/src/stm/ao_adc_stm.c
@@ -109,8 +109,10 @@ static void
ao_adc_dump(void) __reentrant
{
struct ao_data packet;
- int16_t *d;
+#ifndef AO_ADC_DUMP
uint8_t i;
+ int16_t *d;
+#endif
ao_data_get(&packet);
#ifdef AO_ADC_DUMP
diff --git a/src/stm/ao_i2c_stm.c b/src/stm/ao_i2c_stm.c
index 809b5c6f..1c90cdb8 100644
--- a/src/stm/ao_i2c_stm.c
+++ b/src/stm/ao_i2c_stm.c
@@ -185,7 +185,6 @@ uint8_t
ao_i2c_start(uint8_t index, uint16_t addr)
{
struct stm_i2c *stm_i2c = ao_i2c_stm_info[index].stm_i2c;
- uint32_t sr1, sr2;
int t;
ao_i2c_state[index] = I2C_IDLE;
@@ -239,10 +238,7 @@ uint8_t
ao_i2c_send(void *block, uint16_t len, uint8_t index, uint8_t stop)
{
struct stm_i2c *stm_i2c = ao_i2c_stm_info[index].stm_i2c;
- uint8_t *b = block;
- uint32_t sr1;
uint8_t tx_dma_index = ao_i2c_stm_info[index].tx_dma_index;
- int t;
/* Clear any pending ADDR bit */
(void) stm_i2c->sr2;
@@ -304,8 +300,6 @@ uint8_t
ao_i2c_recv(void *block, uint16_t len, uint8_t index, uint8_t stop)
{
struct stm_i2c *stm_i2c = ao_i2c_stm_info[index].stm_i2c;
- uint8_t *b = block;
- int t;
uint8_t ret = TRUE;
if (len == 0)
diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c
index 28a9f9f3..27b82357 100644
--- a/src/stm/ao_usb_stm.c
+++ b/src/stm/ao_usb_stm.c
@@ -119,7 +119,6 @@ static uint8_t ao_usb_in_pending;
static uint8_t ao_usb_out_avail;
static uint8_t ao_usb_running;
static uint8_t ao_usb_configuration;
-static uint8_t ueienx_0;
#define AO_USB_EP0_GOT_RESET 1
#define AO_USB_EP0_GOT_SETUP 2
@@ -313,7 +312,6 @@ ao_usb_init_ep(uint8_t ep, uint32_t addr, uint32_t type, uint32_t stat_rx, uint3
static void
ao_usb_set_ep0(void)
{
- uint32_t epr;
int e;
ao_usb_sram_addr = 0;
@@ -356,8 +354,6 @@ ao_usb_set_ep0(void)
static void
ao_usb_set_configuration(void)
{
- uint32_t epr;
-
debug ("ao_usb_set_configuration\n");
/* Set up the INT end point */