All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Christopher Li <sparse@chrisli.org>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH 2/6] teach sparse how to dump macro definitions
Date: Thu, 1 Jun 2017 16:08:02 +0200	[thread overview]
Message-ID: <CAExDi1Q=_0YJFU=-oYH1Wp4ZqjRW7WODt6foUHxen1_2EXamWA@mail.gmail.com> (raw)
In-Reply-To: <CANeU7Qkukj_K+PtoSezYkN=t_53oy=a7Amp2n0m5RA+owxKtZQ@mail.gmail.com>

On Thu, Jun 1, 2017 at 8:56 AM, Christopher Li <sparse@chrisli.org> wrote:
> On Tue, Apr 4, 2017 at 2:49 PM, Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
>> diff --git a/pre-process.c b/pre-process.c
>> index 7c57ba1cd..74414dfeb 100644
>> --- a/pre-process.c
>> +++ b/pre-process.c
>> @@ -44,6 +44,7 @@
>>  #include "expression.h"
>>  #include "scope.h"
>>
>> +static struct ident_list *macros;      // only needed for -dD
>
> I think the macros list should be initialized as NULL.

It certainly doesn't need to be explicitly initialized to NULL since
all top-level variables that are not explicitly initialized are initialized
to zero by the environment before main() is called.

-- Luc

  reply	other threads:[~2017-06-01 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 21:49 [PATCH 0/6] dump macros definitions Luc Van Oostenryck
2017-04-04 21:49 ` [PATCH 1/6] define ident_list Luc Van Oostenryck
2017-04-04 21:49 ` [PATCH 2/6] teach sparse how to dump macro definitions Luc Van Oostenryck
2017-06-01  6:56   ` Christopher Li
2017-06-01 14:08     ` Luc Van Oostenryck [this message]
2017-04-04 21:49 ` [PATCH 3/6] teach sparse how to handle -dD flag Luc Van Oostenryck
2017-04-04 21:49 ` [PATCH 4/6] let -dD report macro defintions Luc Van Oostenryck
2017-04-04 21:49 ` [PATCH 5/6] let -dD report #undef too Luc Van Oostenryck
2017-04-04 21:49 ` [PATCH 6/6] fix -dD for never-defined #undef Luc Van Oostenryck
2017-04-06  8:05 ` [PATCH 0/6] dump macros definitions Christopher Li
2017-04-06 11:51   ` 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='CAExDi1Q=_0YJFU=-oYH1Wp4ZqjRW7WODt6foUHxen1_2EXamWA@mail.gmail.com' \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.org \
    --subject='Re: [PATCH 2/6] teach sparse how to dump macro definitions' \
    /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

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.