You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/09/07 14:15:55 UTC

[nuttx] 01/04: libsrc: fix build warning

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit a9242c5d6878ab6eb999d37d8994fbaf3921de3a
Author: shizhenghui <sh...@xiaomi.com>
AuthorDate: Mon May 15 12:23:00 2023 +0800

    libsrc: fix build warning
    
    CC:  umm_heap/umm_brkaddr.c libsamplerate/src/samplerate.c: In function ‘src_float_to_int_array’:
    libsamplerate/src/samplerate.c:468:5: warning: "CPU_CLIPS_POSITIVE" is not defined, evaluates to 0 [-Wundef]
      468 | #if CPU_CLIPS_POSITIVE == 0
          |     ^~~~~~~~~~~~~~~~~~
    libsamplerate/src/samplerate.c:474:5: warning: "CPU_CLIPS_NEGATIVE" is not defined, evaluates to 0 [-Wundef]
      474 | #if CPU_CLIPS_NEGATIVE == 0
          |     ^~~~~~~~~~~~~~~~~~
    
    Signed-off-by: shizhenghui <sh...@xiaomi.com>
---
 libs/libc/audio/libsrc/Make.defs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libs/libc/audio/libsrc/Make.defs b/libs/libc/audio/libsrc/Make.defs
index 4fdbabafdf..4a0d9323c3 100644
--- a/libs/libc/audio/libsrc/Make.defs
+++ b/libs/libc/audio/libsrc/Make.defs
@@ -45,6 +45,8 @@ CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\"
 
 CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio
 
+CFLAGS += -DCPU_CLIPS_NEGATIVE=0
+
 ifeq ($(CONFIG_SINC_FAST_CONVERTER),y)
 CFLAGS += -DENABLE_SINC_FAST_CONVERTER
 endif