diff mbox series

[oe,meta-networking,11/17] lowpan-tools: Fix build with gcc7

Message ID 20170424052058.4952-11-raj.khem@gmail.com
State Accepted
Commit 9c022b475e6f3555f25a0294449d912efdfbc0e3
Headers show
Series [oe,meta-multimedia,01/17] musicbrainz: Upgrade to 5.1.0 | expand

Commit Message

Khem Raj April 24, 2017, 5:20 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../0001-Remove-newline-from-format-line.patch     | 32 ++++++++++++++++++++++
 .../lowpan-tools/lowpan-tools_git.bb               |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch

-- 
2.12.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
new file mode 100644
index 000000000..1453b75d5
--- /dev/null
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
@@ -0,0 +1,32 @@ 
+From a36afac485745cf980fba1809526f2025cb4d101 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Apr 2017 00:16:45 -0700
+Subject: [PATCH] Remove newline from format line
+
+Fixes
+
+error: '__builtin___snprintf_chk' output truncated before the last format character [-Werror=format-truncation=]
+     "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+                                               ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ addrdb/addrdb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/addrdb/addrdb.c b/addrdb/addrdb.c
+index 4bb7f79..05d53f3 100644
+--- a/addrdb/addrdb.c
++++ b/addrdb/addrdb.c
+@@ -178,7 +178,7 @@ int addrdb_dump_leases(const char *lease_file)
+ 			continue;
+ 		}
+ 		snprintf(hwaddr_buf, sizeof(hwaddr_buf),
+-				"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
++				"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
+ 				lease->hwaddr[0], lease->hwaddr[1],
+ 				lease->hwaddr[2], lease->hwaddr[3],
+ 				lease->hwaddr[4], lease->hwaddr[5],
+-- 
+2.12.2
+
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
index 0dcc6a785..be73f8ae4 100644
--- a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -13,6 +13,7 @@  SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \
            file://0001-Fix-build-errors-with-clang.patch \
            file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
            file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
+           file://0001-Remove-newline-from-format-line.patch \
            "
 SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733"