mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
CC firmware/pcm.c
firmware/pcm.c: In function ‘pcm_switch_sink’:
firmware/pcm.c:311:38: warning: array subscript 1 is above array bounds of ‘struct pcm_sink *[1]’ [-Warray-bounds]
311 | struct pcm_sink* old_sink = sinks[cur_sink];
| ~~~~~^~~~~~~~~~
firmware/pcm.c:79:25: note: while referencing ‘sinks’
79 | static struct pcm_sink* sinks[PCM_SINK_NUM] = {
|
PCM_SINK_NUM is 1, and cur_sink is initialized to 0. It can never be set
above 0. cur_sink can never be >= PCM_SINK_NUM, ie 0, but for some reason
the compiler thinks otherwise.... sometimes.
This only shows up on native ARM builds with GCC9.5.0
Change-Id: I1aa731a4ee21c46a264c8b70833e3b43e777e8a7
|
||
|---|---|---|
| .. | ||
| asm | ||
| common | ||
| drivers | ||
| export | ||
| include | ||
| kernel | ||
| libc | ||
| reggen | ||
| target | ||
| usbstack | ||
| arabjoin.c | ||
| arabjoin.h | ||
| ata_idle_notify.c | ||
| backlight-sw-fading.c | ||
| backlight.c | ||
| bidi.c | ||
| buflib_malloc.c | ||
| buflib_mempool.c | ||
| chunk_alloc.c | ||
| COPYING | ||
| core_alloc.c | ||
| debug.c | ||
| eeprom_settings.c | ||
| elf_loader.c | ||
| enc_base.c | ||
| events.c | ||
| firmware.make | ||
| font.c | ||
| font_cache.c | ||
| general.c | ||
| hangul.c | ||
| lc-rock.c | ||
| linuxboot.c | ||
| logf.c | ||
| lru.c | ||
| panic.c | ||
| pcm.c | ||
| pcm_mixer.c | ||
| pcm_sampr.c | ||
| pcm_sw_volume.c | ||
| powermgmt.c | ||
| profile.c | ||
| README | ||
| rolo.c | ||
| rom.lds | ||
| screendump.c | ||
| scroll_engine.c | ||
| sdmmc.c | ||
| sound.c | ||
| SOURCES | ||
| storage.c | ||
| system.c | ||
| timer.c | ||
| tuner.c | ||
| usb.c | ||
See docs/README