]> granicus.if.org Git - esp-idf/commit
Initialized some uninitialized variables in rtc_clk.c and ringbuf.c.
authorPieter du Preez <pdupreez@gmail.com>
Mon, 24 Dec 2018 11:37:09 +0000 (11:37 +0000)
committerMahavir Jain <mahavir@espressif.com>
Wed, 23 Jan 2019 11:17:23 +0000 (16:47 +0530)
commit496bfe38420940cc8c6a0e6380b77dbd1490afee
treeace644ccbb5095c2d71376cf0021069085543e64
parent053219283da25cce5698ca3d8ffc4e3d812b9188
Initialized some uninitialized variables in rtc_clk.c and ringbuf.c.

The following 2 compiler warnings are only reproducible when setting:
   OPTIMIZATION_FLAGS = -Ofast

esp-idf/components/soc/esp32/rtc_clk.c:
In function 'rtc_clk_cpu_freq_get':
esp-idf/components/soc/esp32/rtc_clk.c:506:12:
error: 'freq' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
return freq;

esp-idf/components/esp_ringbuf/ringbuf.c:
In function 'xRingbufferReceiveSplitFromISR':
esp-idf/components/esp_ringbuf/ringbuf.c:934:26:
error: 'pvTempTailItem' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
*ppvTailItem = pvTempTailItem;

Closes https://github.com/espressif/esp-idf/pull/2878
components/esp_ringbuf/ringbuf.c
components/soc/esp32/rtc_clk.c