All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: git@vger.kernel.org, t.gummerer@gmail.com, avarab@gmail.com,
	pclouds@gmail.com, jonathantanmy@google.com
Subject: Re: [PATCH 2/3] Makefile: avoid multiple -Wall in CFLAGS
Date: Tue, 28 Sep 2021 14:19:49 -0700	[thread overview]
Message-ID: <xmqqbl4cjt3e.fsf@gitster.g> (raw)
In-Reply-To: <20210928091054.78895-3-carenas@gmail.com> ("Carlo Marcelo Arenas Belón"'s message of "Tue, 28 Sep 2021 02:10:53 -0700")

Carlo Marcelo Arenas Belón  <carenas@gmail.com> writes:

> 6163f3f1a4 (config.mak.dev: add -Wall, primarily for -Wformat, to help
> autoconf users, 2018-10-12) adds a second -Wall in config.mak.dev to
> workaround the lack of one from config.mak.autogen.
>
> Since 6d5d4b4e93 (Makefile: allow for combining DEVELOPER=1 and
> CFLAGS="...", 2019-02-22), that variable is set instead as part of
> DEVELOPER_FLAGS which won't be overriden by config.mak.autogen, so
> it can be safely removed from config.mak.dev if set instead in the
> Makefile.

Hmph, don't this break non-developers, though?

They now do not get -Wall that they used to?  Or am I reading the
patch incorrectly?

Thanks.

> This also has the advantage of separating cleanly CFLAGS which are
> used for building with the ones that provide with diagnostics.
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>  Makefile       | 3 ++-
>  config.mak.dev | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9df565f27b..963b9e7c6b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1200,7 +1200,8 @@ endif
>  # Set CFLAGS, LDFLAGS and other *FLAGS variables. These might be
>  # tweaked by config.* below as well as the command-line, both of
>  # which'll override these defaults.
> -CFLAGS = -g -O2 -Wall
> +CFLAGS = -g -O2
> +DEVELOPER_CFLAGS = -Wall
>  LDFLAGS =
>  CC_LD_DYNPATH = -Wl,-rpath,
>  BASIC_CFLAGS = -I.
> diff --git a/config.mak.dev b/config.mak.dev
> index c81be62a5c..90c47d2782 100644
> --- a/config.mak.dev
> +++ b/config.mak.dev
> @@ -6,7 +6,6 @@ ifeq ($(filter no-error,$(DEVOPTS)),)
>  DEVELOPER_CFLAGS += -Werror
>  SPARSE_FLAGS += -Wsparse-error
>  endif
> -DEVELOPER_CFLAGS += -Wall
>  ifeq ($(filter no-pedantic,$(DEVOPTS)),)
>  DEVELOPER_CFLAGS += -pedantic
>  ifneq ($(filter clang4 gcc5,$(COMPILER_FEATURES)),)

  parent reply	other threads:[~2021-09-28 21:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  9:10 [PATCH 0/3] Makefile: tighten pedantic flag Carlo Marcelo Arenas Belón
2021-09-28  9:10 ` [PATCH 1/3] Makefile: restrict -Wpedantic and -Wno-pedantic-ms-format better Carlo Marcelo Arenas Belón
2021-09-28 11:46   ` Ævar Arnfjörð Bjarmason
2021-09-28 23:39     ` Junio C Hamano
2021-09-28  9:10 ` [PATCH 2/3] Makefile: avoid multiple -Wall in CFLAGS Carlo Marcelo Arenas Belón
2021-09-28  9:19   ` Ævar Arnfjörð Bjarmason
2021-09-28 11:03     ` Carlo Arenas
2021-09-28 21:19   ` Junio C Hamano [this message]
2021-09-28 23:22     ` Carlo Arenas
2021-09-29  4:08       ` Junio C Hamano
2021-09-28  9:10 ` [PATCH 3/3] config.mak.dev: simplify compiler check for multiple compilers Carlo Marcelo Arenas Belón
2021-09-28 12:07   ` Ævar Arnfjörð Bjarmason
2021-09-28 21:30     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbl4cjt3e.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=pclouds@gmail.com \
    --cc=t.gummerer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.