All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Stephen Boyd <stephen.boyd@linaro.org>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH 5/5] ignore whole-range overlapping initializer
Date: Tue, 28 Feb 2017 00:34:57 +0800	[thread overview]
Message-ID: <CANeU7QnMB+0-BQmrTar02p5pEtG9TL2ADzqqY3WDrRkJKW57FQ@mail.gmail.com> (raw)
In-Reply-To: <20170222153006.3035-6-luc.vanoostenryck@gmail.com>

On Wed, Feb 22, 2017 at 11:30 PM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> When an array is initialized, it may be convenient to first
> initialize all entries with some default value via the
> '[a ... b]' notation and then override some of these entries
> with a non-default value. Unfortunately, this, of course,
> is not compatible with the default warning flag '-Woverride-init'.

Looks good to me.


> +               if (!a && !Woverride_init_whole_range) {
> +                       // If first entry is the whole range, do not let
> +                       // any warning about it (this allow to initialize
> +                       // an array with some default value and then override
> +                       // some specific entries).

You might want to use some C style multi line comment /* ... */
Using // for multiple line is a bit strange.

Applied to sparse-next, but if you have update version I will
apply that as well.

Chris

  reply	other threads:[~2017-02-27 16:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 16:51 [PATCH] arm64: traps: Mark __le16, __le32, __user variables properly Stephen Boyd
2017-02-17 16:51 ` Stephen Boyd
2017-02-17 17:31 ` Russell King - ARM Linux
2017-02-17 17:31   ` Russell King - ARM Linux
2017-02-17 17:46   ` Stephen Boyd
2017-02-19  1:58 ` Luc Van Oostenryck
2017-02-19  1:58   ` Luc Van Oostenryck
2017-02-20  8:47   ` Stephen Boyd
2017-02-20 10:04     ` Luc Van Oostenryck
2017-02-20 10:04       ` Luc Van Oostenryck
2017-02-20 10:49     ` Mark Rutland
2017-02-20 10:49       ` Mark Rutland
2017-02-20 21:33       ` Luc Van Oostenryck
2017-02-20 21:33         ` Luc Van Oostenryck
2017-02-21 11:03         ` Will Deacon
2017-02-21 11:03           ` Will Deacon
2017-02-22 13:00           ` Luc Van Oostenryck
2017-02-22 13:00             ` Luc Van Oostenryck
2017-02-22 15:30           ` [PATCH 0/5] improve detection of overlapping initializers Luc Van Oostenryck
2017-02-22 15:30             ` [PATCH 1/5] use option: '-Woverride-init' Luc Van Oostenryck
2017-02-22 15:30             ` [PATCH 2/5] add test case for warnings about overlapping initializers Luc Van Oostenryck
2017-02-22 15:30             ` [PATCH 3/5] allow to warn on all " Luc Van Oostenryck
2017-02-22 15:30             ` [PATCH 4/5] fix checking of overlapping initializer Luc Van Oostenryck
2017-02-22 15:30             ` [PATCH 5/5] ignore whole-range " Luc Van Oostenryck
2017-02-27 16:34               ` Christopher Li [this message]
2017-02-27 21:38                 ` Luc Van Oostenryck

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=CANeU7QnMB+0-BQmrTar02p5pEtG9TL2ADzqqY3WDrRkJKW57FQ@mail.gmail.com \
    --to=sparse@chrisli.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=stephen.boyd@linaro.org \
    --cc=will.deacon@arm.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.