graphics/freetype2: Work around clang complaining

clang 10 (apple) objects to a fallthrough macro without a statement.
It's really not clear if the fallthrough macro (attribute) is valid,
or just a gcc extension, or if the compiler is right to object to a
lack of statement.  Just add "0;" to not change behavior and avoid the
rabbit hole.
This commit is contained in:
gdt 2023-05-05 17:28:49 +00:00
parent 2e02586953
commit ad71b80a35
3 changed files with 19 additions and 2 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.130 2023/02/09 19:49:45 wiz Exp $
# $NetBSD: Makefile,v 1.131 2023/05/05 17:28:49 gdt Exp $
DISTNAME= freetype-2.13.0
PKGNAME= ${DISTNAME:S/-/2-/}
PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freetype/}
MASTER_SITES+= https://download.savannah.gnu.org/releases/freetype/

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.75 2023/02/09 19:49:06 wiz Exp $
$NetBSD: distinfo,v 1.76 2023/05/05 17:28:49 gdt Exp $
BLAKE2s (freetype-2.13.0.tar.xz) = 54284a00d0808fec9adb90203087d0b19b18fb57bc2d82baf1e91b088e836e8b
SHA512 (freetype-2.13.0.tar.xz) = b93a69a92b99f54c4fc4a276066bc7a87597df132e42ef93f6d973f1425e64bebcc568defa511d39fb04ab4d3a2090a6db1e54cf992a80ff57d658fee28a9110
Size (freetype-2.13.0.tar.xz) = 2492440 bytes
SHA1 (patch-builds_unix_freetype-config.in) = 60217b884a0f50c90f89529eaf909ded2693e3be
SHA1 (patch-builds_unix_unix-cc.in) = dbd8e7011a1128067531526d8aeb0202ff799ad8
SHA1 (patch-src_sfnt_pngshim.c) = 764835fa22265708ba901e21774a48baca2d3baa

View file

@ -0,0 +1,15 @@
$NetBSD: patch-src_sfnt_pngshim.c,v 1.1 2023/05/05 17:28:49 gdt Exp $
Error occurs with clang on macOS 10.13. Unclear if this is a mac bug or a freetype bug.
\todo Determine bug location and report upstream.
--- src/sfnt/pngshim.c.orig 2023-02-08 20:09:32.000000000 +0000
+++ src/sfnt/pngshim.c
@@ -408,6 +408,7 @@
{
default:
/* Shouldn't happen, but ... */
+ 0; /* Avoid error if compiler insists on a statement */
FALL_THROUGH;
case PNG_COLOR_TYPE_RGB_ALPHA: