Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addpkg: openzwave #259

Merged
merged 1 commit into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions openzwave/fix_nullptr_mistakes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
diff --git a/cpp/build/Makefile b/cpp/build/Makefile
index bd9463c..80933fd 100644
--- a/cpp/build/Makefile
+++ b/cpp/build/Makefile
@@ -13,10 +13,10 @@


# what flags we will use for compiling in debug mode
-DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-inline -Wno-format -Werror -Wno-error=sequence-point -Wno-sequence-point -ggdb -DDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\"" -DOPENZWAVE_ENABLE_EXCEPTIONS=1
+DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-inline -Werror -Wno-error=sequence-point -Wno-sequence-point -ggdb -DDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\"" -DOPENZWAVE_ENABLE_EXCEPTIONS=1
DEBUG_CPPFLAGS := -std=c++11
# what flags we will use for compiling in release mode
-RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Werror -Wno-format -Wno-error=sequence-point -Wno-sequence-point -O3 -DNDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\"" -DOPENZWAVE_ENABLE_EXCEPTIONS=1
+RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Werror -Wno-error=sequence-point -Wno-sequence-point -O3 -DNDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\"" -DOPENZWAVE_ENABLE_EXCEPTIONS=1
RELEASE_CPPFLAGS := -std=c++11
#what flags we will use for linking in debug mode
DEBUG_LDFLAGS := -g
diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile
index fe37cf5..984988f 100644
--- a/cpp/examples/MinOZW/Makefile
+++ b/cpp/examples/MinOZW/Makefile
@@ -10,8 +10,8 @@
.PHONY: default clean


-DEBUG_CFLAGS := -Wall -Wno-format -ggdb -DDEBUG $(CPPFLAGS)
-RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3 $(CPPFLAGS)
+DEBUG_CFLAGS := -Wall -ggdb -DDEBUG $(CPPFLAGS)
+RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -O3 $(CPPFLAGS)

DEBUG_LDFLAGS := -g

diff --git a/cpp/src/Driver.cpp b/cpp/src/Driver.cpp
index d6f6969..190b5b7 100644
--- a/cpp/src/Driver.cpp
+++ b/cpp/src/Driver.cpp
@@ -6239,9 +6239,9 @@ void Driver::NotifyWatchers
Log::Write(LogLevel_Info, notification->GetNodeId(), "Dropping Notification as ValueID does not exist");
nit = m_notifications.begin();
delete notification;
- val->Release();
continue;
}
+ val->Release();
break;
}
default:
diff --git a/cpp/src/command_classes/AssociationCommandConfiguration.cpp b/cpp/src/command_classes/AssociationCommandConfiguration.cpp
index 0ac07f4..7e17e3a 100644
--- a/cpp/src/command_classes/AssociationCommandConfiguration.cpp
+++ b/cpp/src/command_classes/AssociationCommandConfiguration.cpp
@@ -204,7 +204,7 @@ bool AssociationCommandConfiguration::HandleMsg
if( Node* node = GetNodeUnsafe() )
{
Group* group = node->GetGroup( groupIdx );
- if( NULL == group )
+ if( NULL != group )
{
if( firstReports )
{
diff --git a/cpp/src/command_classes/UserCode.cpp b/cpp/src/command_classes/UserCode.cpp
index a58091a..7f84bf5 100644
--- a/cpp/src/command_classes/UserCode.cpp
+++ b/cpp/src/command_classes/UserCode.cpp
@@ -466,7 +466,7 @@ bool UserCode::HandleMsg
node->CreateValueString( ValueID::ValueGenre_User, GetCommandClassId(), _instance, i, str, "", false, false, data, 0 );
}
m_userCode[i].status = UserCode_Available;
- memcpy(&m_userCode[i].usercode, 0, 10);
+ memset(&m_userCode[i].usercode, 0, 10);
}
if (m_com.GetFlagBool(COMPAT_FLAG_UC_EXPOSERAWVALUE)) {
node->CreateValueRaw( ValueID::ValueGenre_User, GetCommandClassId(), _instance, UserCodeIndex_RawValue, "Raw UserCode", "", false, false, 0, 0, 0);
25 changes: 25 additions & 0 deletions openzwave/riscv64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git PKGBUILD PKGBUILD
index 1b81af1..1014604 100644
--- PKGBUILD
+++ PKGBUILD
@@ -24,10 +24,12 @@ _tag=890f24b7e88f488eee464ed14c01fbceb276cf2a
source=(
git+https://github.com/OpenZWave/open-zwave.git#tag=${_tag}
openzwave-system-libs.patch
+ fix_nullptr_mistakes.patch
)
b2sums=(
SKIP
56095ee16bb04184b2bf037d7601bc5431c654e1328cd1ad63f1fcb7d6918bcd65ef4ab30ee2c80f3bf3c50e838f5818d23e9d01569e41125e9e68028d021c59
+ d9a3179a7e9db4bde6acca44cb8523b85799668a8a22a37bc625c021af920bafd2cf29de803dd48fe685e67792c2a0cdc2b99c0f18852d1f037dec9f5b297ff2
)

pkgver() {
@@ -40,6 +42,7 @@ prepare() {
cd open-zwave

patch -Np1 -i ../openzwave-system-libs.patch
+ patch -Np1 -i ../fix_nullptr_mistakes.patch
}

build() {