[sr-dev] git:master:322102e6: fix compilation warning for gcc 12.x (GH #3073)

Henning Westerholt hw at gilawa.com
Mon Apr 11 09:40:36 CEST 2022


Module: kamailio
Branch: master
Commit: 322102e6a6b9e775aaa5d9f738e549ba8dddf2cd
URL: https://github.com/kamailio/kamailio/commit/322102e6a6b9e775aaa5d9f738e549ba8dddf2cd

Author: Henning Westerholt <hw at gilawa.com>
Committer: Henning Westerholt <hw at gilawa.com>
Date: 2022-04-11T07:40:09Z

fix compilation warning for gcc 12.x (GH #3073)

---

Modified: src/Makefile.defs

---

Diff:  https://github.com/kamailio/kamailio/commit/322102e6a6b9e775aaa5d9f738e549ba8dddf2cd.diff
Patch: https://github.com/kamailio/kamailio/commit/322102e6a6b9e775aaa5d9f738e549ba8dddf2cd.patch

---

diff --git a/src/Makefile.defs b/src/Makefile.defs
index d2d7c60814..d3ca839c0d 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -283,7 +283,7 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
 	# sed with POSIX.1 regex doesn't support |, + or ?
 	# (darwin, solaris ...) => this complicated expression
 	MKDEP=$(CC) -MM -MG
-	#transform gcc version into 2.9x or 3.0
+	#transform gcc version into some well-known versions, or 9 for newer versions
 	CC_SHORTVER:=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \
 				 sed -e 's/[^0-9]*-\(.*\)/\1/'| \
 				 sed -e 's/2\.9.*/2.9x/' \
@@ -310,7 +310,9 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
 					-e 's/10\.[0-9]\..*/9.0+/' \
 					-e 's/10\.[0-9]$$/9.0+/' \
 					-e 's/11\.[0-9]\..*/9.0+/' \
-					-e 's/11\.[0-9]$$/9.0+/')
+					-e 's/11\.[0-9]$$/9.0+/' \
+					-e 's/12\.[0-9]\..*/9.0+/' \
+					-e 's/12\.[0-9]$$/9.0+/')
 ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
 	# dependencies can be generated on-the-fly while compiling *.c
 	CC_MKDEP_OPTS=-MMD -MP




More information about the sr-dev mailing list