Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: felixonmars/archriscv-packages
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 827e6e653fbbdb3000abb6f872bc9093cb0a3c3f
Choose a base ref
..
head repository: felixonmars/archriscv-packages
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4f2a9a3a701ca1a718514452ec112f93476e361d
Choose a head ref
Showing with 74 additions and 36 deletions.
  1. +70 −0 openzwave/fix_nullptr_mistakes.patch
  2. +0 −32 openzwave/modify_cflags_warning.patch
  3. +4 −4 openzwave/riscv64.patch
70 changes: 70 additions & 0 deletions openzwave/fix_nullptr_mistakes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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..17c23d6 100644
--- a/cpp/src/Driver.cpp
+++ b/cpp/src/Driver.cpp
@@ -6239,7 +6239,6 @@ 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;
}
break;
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);
32 changes: 0 additions & 32 deletions openzwave/modify_cflags_warning.patch

This file was deleted.

8 changes: 4 additions & 4 deletions openzwave/riscv64.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
diff --git PKGBUILD PKGBUILD
index 1b81af1..69f7c23 100644
index 1b81af1..d03ddc1 100644
--- PKGBUILD
+++ PKGBUILD
@@ -24,10 +24,12 @@ _tag=890f24b7e88f488eee464ed14c01fbceb276cf2a
source=(
git+https://github.com/OpenZWave/open-zwave.git#tag=${_tag}
openzwave-system-libs.patch
+ modify_cflags_warning.patch
+ fix_nullptr_mistakes.patch
)
b2sums=(
SKIP
56095ee16bb04184b2bf037d7601bc5431c654e1328cd1ad63f1fcb7d6918bcd65ef4ab30ee2c80f3bf3c50e838f5818d23e9d01569e41125e9e68028d021c59
+ ba756cd4aef20b2636f499b21d51d3888149d6a36196eb496087700ce325b5c713ee92c762b92ba917e4754762ab44d786d819847731c3a5a1e420d55b784455
+ b743f0bcf2d86006e832779edfed67bbb024cf84321c089e66969361d1f91e80f4a2910ab9cf80f3c507405524d29868d9fa12a049115a64c315ccfa03be7e54
)

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

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

build() {