Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
37cdeb67 by Martin Storsjö at 2021-06-03T12:41:33+00:00
contrib: harfbuzz: Don't treat -Wunused as an error, fix building with 
Clang 13

This fixes building with the very latest nightly of Clang.

- - - - -


2 changed files:

- + contrib/src/harfbuzz/0004-Don-t-treat-Wunused-as-an-error.patch
- contrib/src/harfbuzz/rules.mak


Changes:

=====================================
contrib/src/harfbuzz/0004-Don-t-treat-Wunused-as-an-error.patch
=====================================
@@ -0,0 +1,47 @@
+From 130296d079a65b26b15acb9d0a69ef9497fad701 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <mar...@martin.st>
+Date: Wed, 2 Jun 2021 09:49:24 +0300
+Subject: [PATCH 4/4] Don't treat -Wunused as an error
+
+This is a fragile warning - newer compilers can add warnings to cases
+that weren't there before.
+
+Clang 13 got support for the -Wunused-but-set-variable warning, which
+gets enabled implicitly via -Wunused, and it warns on one variable
+like this:
+
+hb-subset-cff1.cc:405:33: error: variable 'supp_size' set but not used 
[-Werror,
+-Wunused-but-set-variable]
+    unsigned int  size0, size1, supp_size;
+                                ^
+---
+ src/hb.hh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/hb.hh b/src/hb.hh
+index e46aa0b6e..b0beaaa81 100644
+--- a/src/hb.hh
++++ b/src/hb.hh
+@@ -86,10 +86,8 @@
+ #pragma GCC diagnostic error   "-Wswitch-enum"
+ #pragma GCC diagnostic error   "-Wtautological-overlap-compare"
+ #pragma GCC diagnostic error   "-Wunneeded-internal-declaration"
+-#pragma GCC diagnostic error   "-Wunused"
+ #pragma GCC diagnostic error   "-Wunused-local-typedefs"
+ #pragma GCC diagnostic error   "-Wunused-value"
+-#pragma GCC diagnostic error   "-Wunused-variable"
+ #pragma GCC diagnostic error   "-Wvla"
+ #pragma GCC diagnostic error   "-Wwrite-strings"
+ #endif
+@@ -107,6 +105,8 @@
+ #pragma GCC diagnostic warning "-Wmaybe-uninitialized"
+ #pragma GCC diagnostic warning "-Wmissing-format-attribute"
+ #pragma GCC diagnostic warning "-Wundef"
++#pragma GCC diagnostic warning "-Wunused"
++#pragma GCC diagnostic warning "-Wunused-variable"
+ #endif
+ 
+ /* Ignored currently, but should be fixed at some point. */
+-- 
+2.25.1
+


=====================================
contrib/src/harfbuzz/rules.mak
=====================================
@@ -17,6 +17,7 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz .sum-harfbuzz
        $(APPLY) $(SRC)/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch
        $(APPLY) $(SRC)/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch
        $(APPLY) 
$(SRC)/harfbuzz/0003-Fix-winstore-app-detection-with-mingw64.patch
+       $(APPLY) $(SRC)/harfbuzz/0004-Don-t-treat-Wunused-as-an-error.patch
        $(MOVE)
 
 DEPS_harfbuzz = freetype2 $(DEPS_freetype2)



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/37cdeb672ed47ced022316ddf9f9e85c49f68913

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/37cdeb672ed47ced022316ddf9f9e85c49f68913
You're receiving this email because of your account on code.videolan.org.


_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to