List for cgit developers and users
 help / color / mirror / Atom feed
From: andy at warmcat.com (Andy Green)
Subject: [PATCH v2 0/2] gcc8.1: fix strncpy bounds warnings
Date: Tue, 26 Jun 2018 19:36:25 +0800	[thread overview]
Message-ID: <153001243122.15144.2264749610797891759.stgit@mail.warmcat.com> (raw)
In-Reply-To: <20180616130448.GO1922@john.keeping.me.uk>

These patches fix warnings blown by gcc8.1 about strncpy usage.

The first patch is the first part of v1 that got a confusing
reception the first time.  But I think in the end no objection
to it.

In the second version, I follow John's suggestion and go further
refactoring the affected functions.  Obviously the warning can
be fixed without all this as I did the first time.

Tested on libwebsockets.org.

Tree with these patches on latest for-jason pieces

https://warmcat.com/git/cgit/

---

Andy Green (2):
      gcc8.1: fix strncpy bounds warnings
      cgit_repobasename: convert to allocated result


 cgit.h        |    2 --
 shared.c      |    2 +-
 ui-shared.c   |   53 +++++++++++++++++++++++++++++------------------------
 ui-shared.h   |    3 ++-
 ui-snapshot.c |   21 ++++++++++++++++++---
 5 files changed, 50 insertions(+), 31 deletions(-)

--
Signature


  parent reply	other threads:[~2018-06-26 11:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 23:33 [PATCH 1/2] " andy
2018-06-12 23:34 ` [PATCH 2/2] gcc8.1: fix strcat warning andy
2018-06-16 13:11   ` john
2018-06-16 21:52     ` list
2018-06-17  2:28       ` andy
2018-06-16 13:04 ` [PATCH 1/2] gcc8.1: fix strncpy bounds warnings john
2018-06-16 13:07   ` [PATCH 1/2] shared: allocate return value from expand_macros() john
2018-06-16 13:07     ` [PATCH 2/2] shared: use strbuf for expanding macros john
2018-06-16 13:12   ` [PATCH 1/2] gcc8.1: fix strncpy bounds warnings andy
2018-06-16 14:14     ` john
2018-06-26 11:36   ` andy [this message]
2018-06-26 11:36     ` [PATCH v2 " andy
2018-06-26 11:36     ` [PATCH v2 2/2] cgit_repobasename: convert to allocated result andy

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=153001243122.15144.2264749610797891759.stgit@mail.warmcat.com \
    --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).