Skip to content

Commit 5f79cd8

Browse files
MarkWangChinesenashif
authored andcommitted
libsbc: fix build issue
Remove `-Wno-array-bounds` as there does not seem to be any issues that require it anymore. Add -Wno-stringop-overflow to avoid what seem like false positive warnings with gcc 13.3. Signed-off-by: Mark Wang <[email protected]>
1 parent 0119c82 commit 5f79cd8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

include/zephyr/libsbc/sbc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <stdint.h>
1111
#include <stdbool.h>
1212
#include <string.h>
13+
#include <zephyr/toolchain.h>
1314
#include "sbc_encoder.h"
1415
#include "oi_codec_sbc.h"
1516
#include "oi_status.h"

modules/libsbc/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
if(CONFIG_LIBSBC_ENCODER OR CONFIG_LIBSBC_DECODER)
22

33
zephyr_library_named(libsbc)
4-
zephyr_library_compile_options(-O3 -std=c11 -ffast-math -Wno-array-bounds)
4+
# -Wno-stringop-overflow was added as otherwise gcc 13.3 produces multiple warnings in this library
5+
# Newer version of gcc do not produce them, and this code is taken from Android where it was
6+
# validated. So these warnings are presumed to be false positives.
7+
zephyr_library_compile_options(-O3 -std=c11 -ffast-math -Wno-stringop-overflow)
58

69
zephyr_library_compile_definitions(SBC_FOR_EMBEDDED_LINUX)
710
zephyr_library_compile_definitions(SBC_NO_PCM_CPY_OPTION)

0 commit comments

Comments
 (0)