* [Buildroot] [PATCH 1/1] openzwave: fix restrict error with gcc 8
@ 2018-12-07 15:38 Fabrice Fontaine
2018-12-08 22:02 ` Peter Korsgaard
2018-12-16 19:41 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-12-07 15:38 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/2a8d2c67bcd1a7c228e9196d3bdb7f608c44c856
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...ation-error-in-regards-to-Werror-restrict.patch | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 package/openzwave/0004-Fix-compilation-error-in-regards-to-Werror-restrict.patch
diff --git a/package/openzwave/0004-Fix-compilation-error-in-regards-to-Werror-restrict.patch b/package/openzwave/0004-Fix-compilation-error-in-regards-to-Werror-restrict.patch
new file mode 100644
index 0000000000..b3dbd8f88e
--- /dev/null
+++ b/package/openzwave/0004-Fix-compilation-error-in-regards-to-Werror-restrict.patch
@@ -0,0 +1,39 @@
+From 14164e9920ce3482747483fc16654c82d3ce445f Mon Sep 17 00:00:00 2001
+From: pipiche38 <pipiche38@users.noreply.github.com>
+Date: Fri, 8 Jun 2018 15:13:39 +0200
+Subject: [PATCH] Fix compilation error in regards to -Werror=restrict
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+/usr/share/domoticz/open-zwave/cpp/src/command_classes/DoorLockLogging.cpp: In member function ?virtual bool OpenZWave::DoorLockLogging::HandleMsg(const uint8*, uint32, uint32)?:
+/usr/share/domoticz/open-zwave/cpp/src/command_classes/DoorLockLogging.cpp:312:15: error: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
+ snprintf(usercode, sizeof(usercode), "%s %d", usercode, (int)_data[12+i]);
+ ^~~~~~~~ ~~~~~~~~
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/OpenZWave/open-zwave/commit/14164e9920ce3482747483fc16654c82d3ce445f]
+---
+ cpp/src/command_classes/DoorLockLogging.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/cpp/src/command_classes/DoorLockLogging.cpp b/cpp/src/command_classes/DoorLockLogging.cpp
+index c235a8497..418f61b7d 100644
+--- a/cpp/src/command_classes/DoorLockLogging.cpp
++++ b/cpp/src/command_classes/DoorLockLogging.cpp
+@@ -304,12 +304,13 @@ bool DoorLockLogging::HandleMsg
+ }
+ uint8 userid = (_data[10]);
+ uint8 usercodelength = (_data[11]);
+- char usercode[254];
++ char usercode[254], tmpusercode[254];
+ snprintf(usercode, sizeof(usercode), "UserCode:");
+ if (usercodelength > 0)
+ for (int i = 0; i < usercodelength; i++ )
+ {
+- snprintf(usercode, sizeof(usercode), "%s %d", usercode, (int)_data[12+i]);
++ strncpy(tmpusercode, usercode, sizeof(tmpusercode));
++ snprintf(usercode, sizeof(usercode), "%s %d", tmpusercode, (int)_data[12+i]);
+ }
+
+ if (valid) {
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] openzwave: fix restrict error with gcc 8
2018-12-07 15:38 [Buildroot] [PATCH 1/1] openzwave: fix restrict error with gcc 8 Fabrice Fontaine
@ 2018-12-08 22:02 ` Peter Korsgaard
2018-12-16 19:41 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-12-08 22:02 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fixes:
> - http://autobuild.buildroot.org/results/2a8d2c67bcd1a7c228e9196d3bdb7f608c44c856
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] openzwave: fix restrict error with gcc 8
2018-12-07 15:38 [Buildroot] [PATCH 1/1] openzwave: fix restrict error with gcc 8 Fabrice Fontaine
2018-12-08 22:02 ` Peter Korsgaard
@ 2018-12-16 19:41 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-12-16 19:41 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fixes:
> - http://autobuild.buildroot.org/results/2a8d2c67bcd1a7c228e9196d3bdb7f608c44c856
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2018.11.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-16 19:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 15:38 [Buildroot] [PATCH 1/1] openzwave: fix restrict error with gcc 8 Fabrice Fontaine
2018-12-08 22:02 ` Peter Korsgaard
2018-12-16 19:41 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox