[vlc-commits] [Git][videolan/vlc][master] contrib: gettext: Backport a gnulib patch to fix building on Clang 16

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Aug 19 11:11:51 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2afe251d by Martin Storsjö at 2022-08-19T10:25:42+00:00
contrib: gettext: Backport a gnulib patch to fix building on Clang 16

Clang 16 made implicit function pointer conversions in C an error
(which previously was only a warning).

This backports the following change from upstream gnulib
to the version of the files bundled in gettext:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/obstack.c?id=0cc39712803ade7b2d4b89c36b143dad72404063

This fixes errors like these:

    obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-function-pointer-types]
    __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                                  ^

- - - - -


2 changed files:

- + contrib/src/gettext/obstack-func-ptr.patch
- contrib/src/gettext/rules.mak


Changes:

=====================================
contrib/src/gettext/obstack-func-ptr.patch
=====================================
@@ -0,0 +1,22 @@
+--- gettext/gettext-tools/libgettextpo/obstack.c.orig	2022-08-12 11:05:36.109187107 +0300
++++ gettext/gettext-tools/libgettextpo/obstack.c	2022-08-12 11:05:47.220954747 +0300
+@@ -326,7 +326,7 @@
+ #   include <libio/iolibio.h>
+ #  endif
+ 
+-static _Noreturn void
++static __attribute_noreturn__ void
+ print_and_abort (void)
+ {
+   /* Don't change any of these strings.  Yes, it would be possible to add
+--- gettext/gettext-tools/gnulib-lib/obstack.c.orig	2022-08-12 11:04:11.938947065 +0300
++++ gettext/gettext-tools/gnulib-lib/obstack.c	2022-08-12 11:04:19.682785156 +0300
+@@ -326,7 +326,7 @@
+ #   include <libio/iolibio.h>
+ #  endif
+ 
+-static _Noreturn void
++static __attribute_noreturn__ void
+ print_and_abort (void)
+ {
+   /* Don't change any of these strings.  Yes, it would be possible to add


=====================================
contrib/src/gettext/rules.mak
=====================================
@@ -18,6 +18,7 @@ $(TARBALLS)/gettext-$(GETTEXT_VERSION).tar.gz:
 gettext: gettext-$(GETTEXT_VERSION).tar.gz .sum-gettext
 	$(UNPACK)
 	$(APPLY) $(SRC)/gettext/gettext-0.21-disable-libtextstyle.patch
+	$(APPLY) $(SRC)/gettext/obstack-func-ptr.patch
 	$(MOVE)
 
 DEPS_gettext = iconv $(DEPS_iconv) libxml2 $(DEPS_libxml2)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2afe251d735b03c030dcd227a9a51fc7d426b7c0

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


VideoLAN code repository instance


More information about the vlc-commits mailing list