Control: tags -1 patch fixed-upstream
On Mon, 4 Dec 2017 10:23:34 +0200 Juhani Numminen
<juhaninummin...@gmail.com> wrote:
Upstream has committed some GCC-7-related fixes.
https://github.com/DIGImend/hidrd/commit/7e94881
https://github.com/DIGImend/hidrd/commit/e126127
I had a successful amd64 build with the two attached patches.
Cheers,
Juhani
Origin: https://github.com/DIGImend/hidrd/commit/e126127ce16aff2b5b8f7dff262bb06180c3ecca
Bug-Debian: https://bugs.debian.org/853443
Last-Update: 2017-12-04
From: Jason Gerecke <killert...@gmail.com>
Date: Wed, 2 Aug 2017 08:01:41 -0700
Subject: [PATCH] Fix implicit-fallthrough warning/error in GCC 7
GCC 7 now warns about implicit fallthrough, causing the build to fail
(due to -Werror) when compiling lib/fmt/xml/snk/element.c.
element.c: In function âxml_snk_element_addpvâ:
element.c:229:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
(void)va_arg(*pap, const char *);
^
element.c:230:13: note: here
case XML_SNK_ELEMENT_NT_COMMENT:
^~~~
---
lib/fmt/xml/snk/element.c | 1 +
1 file changed, 1 insertion(+)
--- a/lib/fmt/xml/snk/element.c
+++ b/lib/fmt/xml/snk/element.c
@@ -229,6 +229,7 @@
case XML_SNK_ELEMENT_NT_ATTR:
/* Retrieve name */
(void)va_arg(*pap, const char *);
+ /* FALLTHROUGH */
case XML_SNK_ELEMENT_NT_COMMENT:
case XML_SNK_ELEMENT_NT_CONTENT:
fmt = va_arg(*pap, hidrd_fmt_type);
Origin: https://github.com/DIGImend/hidrd/commit/7e94881a6059a824efaed41301c4a89a384d86a2
Bug-Debian: https://bugs.debian.org/853443
Last-Update: 2017-12-04
From: Jason Gerecke <killert...@gmail.com>
Date: Wed, 2 Aug 2017 10:10:43 -0700
Subject: [PATCH] Fix truncation warning/error in GCC 7
GCC 7 now warns about potential truncation in printf statements, causing
the build to fail (due to -Werror). Expand the size of our temporary
buffer to make GCC happy.
element_bitmap.c: In function âparse_bitmap_element.isra.0â:
element_bitmap.c:96:59: error: â%zuâ directive output may be truncated writing between 1 and 20 bytes into a region of size 3 [-Werror=format-truncation=]
snprintf(i_name + 3, sizeof(i_name) - 3, "%zu", i);
^~~
element_bitmap.c:96:58: note: directive argument in the range [0, 18446744073709551614]
snprintf(i_name + 3, sizeof(i_name) - 3, "%zu", i);
^~~~~
element_bitmap.c:96:17: note: âsnprintfâ output between 2 and 21 bytes into a destination of size 3
snprintf(i_name + 3, sizeof(i_name) - 3, "%zu", i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
lib/fmt/xml/src/element_bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/fmt/xml/src/element_bitmap.c
+++ b/lib/fmt/xml/src/element_bitmap.c
@@ -66,7 +66,7 @@
bool data;
bool matched;
size_t i;
- char i_name[6] = "bit";
+ char i_name[24] = "bit";
for (i = 0, e = e->children; e != NULL; e = e->next)
{