From 898ebae512555c4be21d2615ca4ae28aef58ad94 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Fri, 12 May 2023 10:01:30 +0200 Subject: [PATCH] MT#57417 'WebRtcSpl_NormU32' is static but used in inline function 'log2_Q10_B' This is a fix for the following warning: entropy_coding.c:101:11: warning: 'WebRtcSpl_NormU32' is static but used in inline function 'log2_Q10_B' which is not static 101 | zeros = WebRtcSpl_NormU32( x ); | ^~~~~~~~~~~~~~~~~ entropy_coding.c:92:10: warning: 'kRPointsQ10' is static but used in inline function 'stepwise' which is not static 92 | return kRPointsQ10[ind]; | ^~~~~~~~~~~ This happens because the inline function has inside it a call to the static function. To fix the warning, we just make the `log2_Q10_B()` and `stepwise()` functions static. It's quite safe, since they are not even in use by anything. Change-Id: Id6588d85c7d347d5669d6495188e798fe7c70b05 --- core/plug-in/isac/libisac/entropy_coding.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/plug-in/isac/libisac/entropy_coding.c b/core/plug-in/isac/libisac/entropy_coding.c index a7299447..e0b1ef2c 100644 --- a/core/plug-in/isac/libisac/entropy_coding.c +++ b/core/plug-in/isac/libisac/entropy_coding.c @@ -75,7 +75,7 @@ static const WebRtc_Word32 lbcnQ10 = -402874; #define MINBITS_Q10 10240 /* 10.0 in Q10 */ #define IS_SWB_12KHZ 1 -__inline WebRtc_UWord32 stepwise(WebRtc_Word32 dinQ10) { +static __inline WebRtc_UWord32 stepwise(WebRtc_Word32 dinQ10) { WebRtc_Word32 ind, diQ10, dtQ10; @@ -92,8 +92,7 @@ __inline WebRtc_UWord32 stepwise(WebRtc_Word32 dinQ10) { return kRPointsQ10[ind]; } - -__inline short log2_Q10_B( int x ) +static __inline short log2_Q10_B( int x ) { int zeros; short frac; @@ -103,8 +102,6 @@ __inline short log2_Q10_B( int x ) return (short) (((31 - zeros) << 10) + frac); } - - /* compute correlation from power spectrum */ static void WebRtcIsac_FindCorrelation(WebRtc_Word32 *PSpecQ12, WebRtc_Word32 *CorrQ7) {