Fix compilation warnings in libvpx (-Wunused-function)
authorSeungSeop Park <sns.park@samsung.com>
Fri, 8 Jan 2016 06:35:59 +0000 (15:35 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
Currently, there are 27 warnings saying:
> ../../third_party/libvpx_new/source/libvpx/vp9/encoder/vp9_denoiser.h:63:12:\
> warning: 'total_adj_strong_thresh' defined but not used [-Wunused-function]

It's because |total_adj_strong_thresh| is defined as static function in .h file.
So warning will appear in any file that includes the header but does not use
the function.

The suggested solution is to declare the static function as inline.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15496

Reviewed by: sns.park

Change-Id: Ic2173c0c3560256df1319d4344988618c71ec9a2
Signed-off-by: SeungSeop Park <sns.park@samsung.com>
tizen_src/build/patches/fix_warning_for_libvpx.diff [new file with mode: 0644]

diff --git a/tizen_src/build/patches/fix_warning_for_libvpx.diff b/tizen_src/build/patches/fix_warning_for_libvpx.diff
new file mode 100644 (file)
index 0000000..15d84c9
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/third_party/libvpx_new/source/libvpx/vp9/encoder/vp9_denoiser.h b/third_party/libvpx_new/source/libvpx/vp9/encoder/vp9_denoiser.h
+index bc676e9..1cd1e6d 100644
+--- a/third_party/libvpx_new/source/libvpx/vp9/encoder/vp9_denoiser.h
++++ b/third_party/libvpx_new/source/libvpx/vp9/encoder/vp9_denoiser.h
+@@ -73,7 +73,7 @@ int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height,
+ // This function is used by both c and sse2 denoiser implementations.
+ // Define it as a static function within the scope where vp9_denoiser.h
+ // is referenced.
+-static int total_adj_strong_thresh(BLOCK_SIZE bs, int increase_denoising) {
++inline static int total_adj_strong_thresh(BLOCK_SIZE bs, int increase_denoising) {
+   return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 3 : 2);
+ }
+ #endif