From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy at warmcat.com (Andy Green) Date: Tue, 26 Jun 2018 19:36:25 +0800 Subject: [PATCH v2 0/2] gcc8.1: fix strncpy bounds warnings In-Reply-To: <20180616130448.GO1922@john.keeping.me.uk> References: <20180616130448.GO1922@john.keeping.me.uk> Message-ID: <153001243122.15144.2264749610797891759.stgit@mail.warmcat.com> 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