86e3b76
From 991b5e95d4fe7778c8f5e7d7f478d01134d51ca7 Mon Sep 17 00:00:00 2001
86e3b76
From: Laura Abbott <labbott@redhat.com>
86e3b76
Date: Wed, 14 Mar 2018 14:20:02 -0700
86e3b76
Subject: [PATCH] Temporarily work around gcc aliasing warning/error
86e3b76
86e3b76
Signed-off-by: Laura Abbott <labbott@redhat.com>
86e3b76
---
86e3b76
 tools/lib/str_error_r.c | 3 ++-
86e3b76
 1 file changed, 2 insertions(+), 1 deletion(-)
86e3b76
86e3b76
diff --git a/tools/lib/str_error_r.c b/tools/lib/str_error_r.c
86e3b76
index d6d65537b0d9..c0ede4f6adae 100644
86e3b76
--- a/tools/lib/str_error_r.c
86e3b76
+++ b/tools/lib/str_error_r.c
86e3b76
@@ -21,7 +21,8 @@
86e3b76
 char *str_error_r(int errnum, char *buf, size_t buflen)
86e3b76
 {
86e3b76
 	int err = strerror_r(errnum, buf, buflen);
86e3b76
+	void *temp = buf;
86e3b76
 	if (err)
86e3b76
-		snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err);
86e3b76
+		snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, temp, buflen, err);
86e3b76
 	return buf;
86e3b76
 }
86e3b76
-- 
86e3b76
2.16.2
86e3b76