From: Junio C Hamano Date: Tue, 15 Apr 2025 20:50:16 +0000 (-0700) Subject: Merge branch 'js/comma-semicolon-confusion' X-Git-Tag: v2.50.0-rc0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b03646f85b6eb4c0f6e05ed4b235577d3969532;p=thirdparty%2Fgit.git Merge branch 'js/comma-semicolon-confusion' Code clean-up. * js/comma-semicolon-confusion: detect-compiler: detect clang even if it found CUDA clang: warn when the comma operator is used compat/regex: explicitly mark intentional use of the comma operator wildmatch: avoid using of the comma operator diff-delta: avoid using the comma operator xdiff: avoid using the comma operator unnecessarily clar: avoid using the comma operator unnecessarily kwset: avoid using the comma operator unnecessarily rebase: avoid using the comma operator unnecessarily remote-curl: avoid using the comma operator unnecessarily --- 7b03646f85b6eb4c0f6e05ed4b235577d3969532 diff --cc config.mak.dev index 95b7bc46ae,3142363816..e86b6e1b34 --- a/config.mak.dev +++ b/config.mak.dev @@@ -39,8 -39,11 +39,12 @@@ DEVELOPER_CFLAGS += -Wunuse DEVELOPER_CFLAGS += -Wvla DEVELOPER_CFLAGS += -Wwrite-strings DEVELOPER_CFLAGS += -fno-common +DEVELOPER_CFLAGS += -Wunreachable-code + ifneq ($(filter clang9,$(COMPILER_FEATURES)),) + DEVELOPER_CFLAGS += -Wcomma + endif + ifneq ($(filter clang4,$(COMPILER_FEATURES)),) DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare endif