List for cgit developers and users
 help / color / mirror / Atom feed
From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: [PATCH] ui-snapshot.c: Terminate cgit_snapshot_formats[] properly
Date: Mon, 4 Mar 2013 08:01:51 +0100	[thread overview]
Message-ID: <20130304070151.GA19522@blizzard> (raw)
In-Reply-To: <CAEik5nPb8nteeEUP3cGFkgOPHTuhyZneznyedR6hqTmX=r-4LQ@mail.gmail.com>

On Sun, Mar 03, 2013 at 04:16:35PM -0600, Dan McGee wrote:
> On Sun, Mar 3, 2013 at 4:09 PM, Lukas Fleischer <cgit at cryptocrack.de> wrote:
> > Explicitly set the suffix field of the terminating format entry to 0.
> > This fixes a GCC warning seen with "-Wmissing-field-initializers".
> >
> > Signed-off-by: Lukas Fleischer <cgit at cryptocrack.de>
> > ---
> >  ui-snapshot.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ui-snapshot.c b/ui-snapshot.c
> > index 47432bd..e740645 100644
> > --- a/ui-snapshot.c
> > +++ b/ui-snapshot.c
> > @@ -48,7 +48,7 @@ const struct cgit_snapshot_format cgit_snapshot_formats[] = {
> >         { ".tar.bz2", "application/x-bzip2", write_tar_bzip2_archive, 0x04 },
> >         { ".tar", "application/x-tar", write_tar_archive, 0x08 },
> >         { ".tar.xz", "application/x-xz", write_tar_xz_archive, 0x10 },
> > -       {}
> > +       { 0 }
> Why 0 and not NULL here, as is convention for strings?

I agree that "NULL" is a slightly better choice here.

Jason: Could you please fix this before merging this patch?

> 
> >  };
> >
> >  static const struct cgit_snapshot_format *get_format(const char *filename)
> > --
> > 1.8.2.rc0.247.g811e0c0
> >
> >
> > _______________________________________________
> > cgit mailing list
> > cgit at hjemli.net
> > http://hjemli.net/mailman/listinfo/cgit




  reply	other threads:[~2013-03-04  7:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-03 22:09 cgit
2013-03-03 22:16 ` dpmcgee
2013-03-04  7:01   ` cgit [this message]
2013-03-04 14:13     ` Jason
2013-03-03 22:55 ` john
2013-03-03 23:41   ` cgit
2013-03-03 23:53     ` john
2013-03-03 23:59     ` Jason
2013-03-03 23:51 ` [PATCH v2] " cgit

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=20130304070151.GA19522@blizzard \
    --to=cgit@lists.zx2c4.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).