From d7cd76935f6d5bcd5816430ef80256a88fb4e231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Sun, 28 Apr 2024 18:32:28 +0000 Subject: [PATCH] [Var] vorbis: Silence GCC false-positive warning. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20682 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- include/vorbis/OpenMPT.txt | 1 + include/vorbis/lib/lpc.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/vorbis/OpenMPT.txt b/include/vorbis/OpenMPT.txt index b4e4225bd41..5d3df0a97cc 100644 --- a/include/vorbis/OpenMPT.txt +++ b/include/vorbis/OpenMPT.txt @@ -4,6 +4,7 @@ The following changes have been made: symbian, test, vq) have been removed. - https://github.com/xiph/vorbis/pull/100 and https://github.com/xiph/vorbis/pull/101 have been applied. +- A GCC warning in lib/lpc.c has been silenced. - All modifications have been marked with /* OpenMPT */. - For building, premake is used to generate Visual Studio project files. See ../build/premake/ for details. diff --git a/include/vorbis/lib/lpc.c b/include/vorbis/lib/lpc.c index 877da47f8ef..184d5c75dad 100644 --- a/include/vorbis/lib/lpc.c +++ b/include/vorbis/lib/lpc.c @@ -75,7 +75,14 @@ float vorbis_lpc_from_data(float *data,float *lpci,int n,int m){ /* Generate lpc coefficients from autocorr values */ /* set our noise floor to about -100dB */ +#if defined(__GNUC__) && !defined(__clang__) && !defined(_MSC_VER) /* OpenMPT */ +#pragma GCC diagnostic push /* OpenMPT */ +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" /* OpenMPT */ +#endif /* OpenMPT */ error=aut[0] * (1. + 1e-10); +#if defined(__GNUC__) && !defined(__clang__) && !defined(_MSC_VER) /* OpenMPT */ +#pragma GCC diagnostic pop /* OpenMPT */ +#endif /* OpenMPT */ epsilon=1e-9*aut[0]+1e-10; for(i=0;i