From 256d6ccef0dfe3f8b00080744eab1cffd6b410ff Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 10 Nov 2014 11:19:50 -0800 Subject: [PATCH] Re-scope buffer[] to solve unread array warning. --- firmware/sgpio/sgpio_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/sgpio/sgpio_test.c b/firmware/sgpio/sgpio_test.c index 802129db..6e391c10 100644 --- a/firmware/sgpio/sgpio_test.c +++ b/firmware/sgpio/sgpio_test.c @@ -30,17 +30,18 @@ #include #include +volatile uint32_t buffer[4096]; + void tx_test() { sgpio_set_slice_mode(false); sgpio_configure(TRANSCEIVER_MODE_TX); // LSB goes out first, samples are 0x - volatile uint32_t buffer[] = { - 0xda808080, - 0xda80ff80, - 0x26808080, - 0x26800180, - }; + buffer[0] = 0xda808080; + buffer[1] = 0xda80ff80; + buffer[2] = 0x26808080; + buffer[3] = 0x26800180; + uint32_t i = 0; sgpio_cpld_stream_enable(); @@ -56,7 +57,6 @@ void rx_test() { sgpio_set_slice_mode(false); sgpio_configure(TRANSCEIVER_MODE_RX); - volatile uint32_t buffer[4096]; uint32_t i = 0; sgpio_cpld_stream_enable();