From a5e44c3f2cc982e0d9aca11e45733bd312c8a19c Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 22 Dec 2023 08:24:14 +0200 Subject: [PATCH 1/3] Update to Freeciv server freeciv/freeciv@3148f236ff Signed-off-by: Marko Lindqvist --- freeciv-web/src/main/webapp/javascript/fc_types.js | 2 +- freeciv/version.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freeciv-web/src/main/webapp/javascript/fc_types.js b/freeciv-web/src/main/webapp/javascript/fc_types.js index 6f77be6f6..e6cb02cfb 100644 --- a/freeciv-web/src/main/webapp/javascript/fc_types.js +++ b/freeciv-web/src/main/webapp/javascript/fc_types.js @@ -28,7 +28,7 @@ var MAX_NUM_ITEMS = 200; var MAX_NUM_ADVANCES = 250; var MAX_NUM_UNITS = 250; var MAX_NUM_BUILDINGS = 200; -var MAX_EXTRA_TYPES = 128; +var MAX_EXTRA_TYPES = 250; var MAX_LEN_NAME = 48; var MAX_LEN_CITYNAME = 50; diff --git a/freeciv/version.txt b/freeciv/version.txt index f99c7aa17..f56cb5fea 100644 --- a/freeciv/version.txt +++ b/freeciv/version.txt @@ -1,9 +1,9 @@ # The Git SHA hash for the commit to checkout from # https://github.com/freeciv/freeciv -FCREV=dc2129bd3539ce44f495dd080dc9ac9847501948 +FCREV=3148f236ff688a5270d9e1e2ad82a915c41b0128 -ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2023.Oct.09" +ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2023.Nov.06" # There's no need to bump this constantly as current freeciv-web # makes no connections to outside world - all connections are From 9b22f26b07c5e646d7a34d037eaa21b4fd4d481e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 22 Dec 2023 14:15:26 +0200 Subject: [PATCH 2/3] Server: Backport 0029-universal_value_initial-Fix-switch-case-fall-through.patch Signed-off-by: Marko Lindqvist --- freeciv/apply_patches.sh | 4 +++ ...initial-Fix-switch-case-fall-through.patch | 31 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 freeciv/patches/backports/0029-universal_value_initial-Fix-switch-case-fall-through.patch diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index 1ddbdb8ab..b5dc9f60b 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -24,6 +24,9 @@ # 0027-worklist_item_postpone_req_vec-Add-break-for-VUT_PLA.patch # Build target postponing fix # RM #72 +# 0029-universal_value_initial-Fix-switch-case-fall-through.patch +# Compiler warning fix +# RM #74 # Not in the upstream Freeciv server # ---------------------------------- @@ -52,6 +55,7 @@ declare -a PATCHLIST=( "backports/0005-Meson-Define-SIZEOF_INT" "backports/0029-Meson-Search-mwand-by-MagickWand-6.Q16HDRI.pc" "backports/0027-worklist_item_postpone_req_vec-Add-break-for-VUT_PLA" + "backports/0029-universal_value_initial-Fix-switch-case-fall-through" "meson_webperimental" "metachange" "text_fixes" diff --git a/freeciv/patches/backports/0029-universal_value_initial-Fix-switch-case-fall-through.patch b/freeciv/patches/backports/0029-universal_value_initial-Fix-switch-case-fall-through.patch new file mode 100644 index 000000000..219f3e30b --- /dev/null +++ b/freeciv/patches/backports/0029-universal_value_initial-Fix-switch-case-fall-through.patch @@ -0,0 +1,31 @@ +From 6a8e4db8ef72342a90d24bf8b36a81bb37c742f9 Mon Sep 17 00:00:00 2001 +From: Marko Lindqvist +Date: Fri, 22 Dec 2023 07:28:58 +0200 +Subject: [PATCH 29/30] universal_value_initial(): Fix switch-case fall + throughs + +See RM #74 + +Signed-off-by: Marko Lindqvist +--- + tools/ruledit/univ_value.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/ruledit/univ_value.c b/tools/ruledit/univ_value.c +index a6fdc414e8..aa8840bbdb 100644 +--- a/tools/ruledit/univ_value.c ++++ b/tools/ruledit/univ_value.c +@@ -232,8 +232,10 @@ bool universal_value_initial(struct universal *src) + return TRUE; + case VUT_PLAYER_FLAG: + src->value.plr_flag = PLRF_AI; ++ return TRUE; + case VUT_PLAYER_STATE: + src->value.plrstate = PLRS_BARBARIAN; ++ return TRUE; + case VUT_ACTION: + src->value.action = action_by_number(0); + return TRUE; +-- +2.43.0 + From 9049a575eaca656751735dc2a1e8244e1ded35ac Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 24 Dec 2023 20:47:21 +0200 Subject: [PATCH 3/3] Server: Backport 0031-Meson-Enable-implicit-fallthrough-compiler-warnings.patch Signed-off-by: Marko Lindqvist --- freeciv/apply_patches.sh | 4 +++ ...plicit-fallthrough-compiler-warnings.patch | 29 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 freeciv/patches/backports/0031-Meson-Enable-implicit-fallthrough-compiler-warnings.patch diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index b5dc9f60b..f58f365e4 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -27,6 +27,9 @@ # 0029-universal_value_initial-Fix-switch-case-fall-through.patch # Compiler warning fix # RM #74 +# 0031-Meson-Enable-implicit-fallthrough-compiler-warnings.patch +# Stricter compiler warnings +# RM #76 # Not in the upstream Freeciv server # ---------------------------------- @@ -56,6 +59,7 @@ declare -a PATCHLIST=( "backports/0029-Meson-Search-mwand-by-MagickWand-6.Q16HDRI.pc" "backports/0027-worklist_item_postpone_req_vec-Add-break-for-VUT_PLA" "backports/0029-universal_value_initial-Fix-switch-case-fall-through" + "backports/0031-Meson-Enable-implicit-fallthrough-compiler-warnings" "meson_webperimental" "metachange" "text_fixes" diff --git a/freeciv/patches/backports/0031-Meson-Enable-implicit-fallthrough-compiler-warnings.patch b/freeciv/patches/backports/0031-Meson-Enable-implicit-fallthrough-compiler-warnings.patch new file mode 100644 index 000000000..d6b756cff --- /dev/null +++ b/freeciv/patches/backports/0031-Meson-Enable-implicit-fallthrough-compiler-warnings.patch @@ -0,0 +1,29 @@ +From ed24740775fa169065fd0f65694066f8b87ded35 Mon Sep 17 00:00:00 2001 +From: Marko Lindqvist +Date: Fri, 22 Dec 2023 14:58:27 +0200 +Subject: [PATCH 31/31] Meson: Enable implicit-fallthrough compiler warnings + +See RM #76 + +Signed-off-by: Marko Lindqvist +--- + meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 1234216ec4..a631e45db0 100644 +--- a/meson.build ++++ b/meson.build +@@ -32,7 +32,8 @@ c_cpp_args = [ + '-Wshadow', + '-Wold-style-declaration', + '-Wold-style-definition', +- '-Wtype-limits' ++ '-Wtype-limits', ++ '-Wimplicit-fallthrough' + ] + + foreach arg : c_args +-- +2.43.0 +