[Scummvm-git-logs] scummvm branch-2-7 -> 5d5e7e946bed4ef180bcfb3bf5bfe2b4acef54a0

dwatteau noreply at scummvm.org
Wed Apr 12 07:58:20 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ca09a3292a MACOS: BUILD: Don't depend on `xattr` on older OSX
5d5e7e946b BUILD: Disable -Wshadow and -Wmissing-field-initializers before GCC 5


Commit: ca09a3292ab03e63f9c7d7afe1c186d1fc35fb58
    https://github.com/scummvm/scummvm/commit/ca09a3292ab03e63f9c7d7afe1c186d1fc35fb58
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-04-12T09:56:12+02:00

Commit Message:
MACOS: BUILD: Don't depend on `xattr` on older OSX

The API was there but not the tool (which appeared in Leopard), and
even if you give it a replacement, Finder/TextEdit won't use the extra
encoding metadata that's used there, so it's useless on older OSX.

Changed paths:
    ports.mk


diff --git a/ports.mk b/ports.mk
index dd46fcbeb90..616cbf728a1 100644
--- a/ports.mk
+++ b/ports.mk
@@ -543,7 +543,7 @@ osxsnap: bundle
 	cp $(DIST_FILES_DOCS_se) ./ScummVM-snapshot/doc/se/
 	$(XCODETOOLSPATH)/SetFile -t ttro -c ttxt ./ScummVM-snapshot/doc/QuickStart
 	$(XCODETOOLSPATH)/SetFile -t ttro -c ttxt ./ScummVM-snapshot/doc/*/*
-	xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/*/*
+	command -v xattr >/dev/null 2>&1 && xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/*/*
 	cp -RP $(bundle_name) ./ScummVM-snapshot/
 	cp $(srcdir)/dists/macosx/DS_Store ./ScummVM-snapshot/.DS_Store
 	cp $(srcdir)/dists/macosx/background.jpg ./ScummVM-snapshot/background.jpg


Commit: 5d5e7e946bed4ef180bcfb3bf5bfe2b4acef54a0
    https://github.com/scummvm/scummvm/commit/5d5e7e946bed4ef180bcfb3bf5bfe2b4acef54a0
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-04-12T09:56:30+02:00

Commit Message:
BUILD: Disable -Wshadow and -Wmissing-field-initializers before GCC 5

They just gave many false positives creating a lot of noise in build
logs for ports using an older GCC.

Changed paths:
    Makefile
    configure


diff --git a/Makefile b/Makefile
index 60056c87ee0..58db5b03a2a 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ ifeq "$(HAVE_GCC)" "1"
 	CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
 	# Enable even more warnings...
 	CXXFLAGS+= -Wpointer-arith -Wcast-qual
-	CXXFLAGS+= -Wshadow -Wnon-virtual-dtor -Wwrite-strings
+	CXXFLAGS+= -Wnon-virtual-dtor -Wwrite-strings
 
 	# Currently we disable this gcc flag, since it will also warn in cases,
 	# where using GCC_PRINTF (means: __attribute__((format(printf, x, y))))
diff --git a/configure b/configure
index 560dc06295f..7bf16385f42 100755
--- a/configure
+++ b/configure
@@ -2163,8 +2163,17 @@ if test "$have_gcc" = yes; then
 		cxx_version=`gcc_get_define __clang_version__`
 		cxx_version="`echo "${cxx_version}" | sed -e 's/"\([^ ]*\) .*/\1/'`"
 		cxx_version="clang $cxx_version, ok"
+
+		append_var CXXFLAGS "-Wshadow"
 	else
 		cxx_version="GCC $cxx_version, ok"
+
+		# Way too many false positives before GCC 5
+		if test $_cxx_major -ge 5; then
+			append_var CXXFLAGS "-Wshadow"
+		else
+			append_var CXXFLAGS "-Wno-missing-field-initializers"
+		fi
 	fi
 elif test "$have_icc" = yes; then
 	cxx_version="`( $CXX -dumpversion ) 2>/dev/null`"




More information about the Scummvm-git-logs mailing list