Skip to contentSkip to conversation

libcec: Fix type mismatch for return value of LibCecBootloader()

PATCH New Khem Raj 1 participant 2 messages Jan 28, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 libcec: Fix type mismatch for return value of LibCecBootloader()

---
 ...return-type-of-function-LibCecBootlo.patch | 41 +++++++++++++++++++
 .../recipes-extended/libcec/libcec_6.0.2.bb   |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libcec/libcec/0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch
meta-oe/recipes-extended/libcec/libcec/0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch new file +41 -0
new file mode 100644
index 0000000000..ab1ab5b8eb
@@ -0,0 +1,41 @@
+From 2241edc8b70c2a54d109ac9c0e821889ac138d40 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 27 Jan 2022 22:49:52 -0800
+Subject: [PATCH] cecloader: Match return type of function LibCecBootloader
+
+Fixes
+include/cecloader.h:175:14: error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
+      return NULL;
+             ^~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ include/cecloader.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/cecloader.h b/include/cecloader.h
+index be76468f..550f598e 100644
+--- a/include/cecloader.h
++++ b/include/cecloader.h
+@@ -172,7 +172,7 @@ bool LibCecBootloader(const char *strLib = NULL)
+     if (!g_libCEC)
+     {
+       std::cout << dlerror() << std::endl;
+-      return NULL;
++      return false;
+     }
+   }
+ 
+@@ -181,7 +181,7 @@ bool LibCecBootloader(const char *strLib = NULL)
+   if (!LibCecBootloader)
+   {
+     std::cout << "cannot find CECStartBootloader" << std::endl;
+-    return NULL;
++    return false;
+   }
+ 
+   bool bReturn = LibCecBootloader();
+-- 
+2.35.0
+
meta-oe/recipes-extended/libcec/libcec_6.0.2.bb +1 -0
index eabe1d476a..2036c53eff 100644
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release;protocol=https
            file://0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch \
            file://0001-Enhance-reproducibility.patch \
            file://0001-Remove-buggy-test-confusing-host-and-target.patch \
+           file://0001-cecloader-Match-return-type-of-function-LibCecBootlo.patch \
           "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.35.0
author
#1 lore raw

PATCH 2/2 gparted: Do not use NULL where boolean is expected

---
 ...t-use-NULL-where-boolean-is-expected.patch | 33 +++++++++++++++++++
 .../recipes-extended/gparted/gparted_1.3.1.bb |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-gnome/recipes-extended/gparted/files/0001-Do-not-use-NULL-where-boolean-is-expected.patch
meta-gnome/recipes-extended/gparted/files/0001-Do-not-use-NULL-where-boolean-is-expected.patch new file +33 -0
new file mode 100644
index 0000000000..1b0d24024b
@@ -0,0 +1,33 @@
+From 9af84e1c08a2159c10baf13244e2c8a7d7e837e9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 27 Jan 2022 23:02:20 -0800
+Subject: [PATCH] Do not use NULL where boolean is expected
+
+Fixes
+src/GParted_Core.cc:73:57: error: static_cast from 'nullptr_t' to 'PedPartitionFlag' (aka '_PedPartitionFlag') is not allowed
+|         for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast<PedPartitionFlag>( NULL ) ) ;
+|                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+| 1 error generated.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/GParted_Core.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
+index f7ac970..3290c66 100644
+--- a/src/GParted_Core.cc
++++ b/src/GParted_Core.cc
+@@ -70,7 +70,7 @@ GParted_Core::GParted_Core()
+ 	ped_exception_set_handler( ped_exception_handler ) ; 
+ 
+ 	//get valid flags ...
+-	for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast<PedPartitionFlag>( NULL ) ) ;
++	for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast<PedPartitionFlag>( false ) ) ;
+ 	      flag ;
+ 	      flag = ped_partition_flag_next( flag ) )
+ 		flags .push_back( flag ) ;
+-- 
+2.35.0
+
meta-gnome/recipes-extended/gparted/gparted_1.3.1.bb +1 -0
index 1c8dd69686..355bcce9b6 100644
@@ -10,6 +10,7 @@ REQUIRED_DISTRO_FEATURES = "x11"
 SRC_URI = " \
     ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
     file://0001-Install-polkit-action-unconditionally-executable-pke.patch \
+    file://0001-Do-not-use-NULL-where-boolean-is-expected.patch \
 "
 SRC_URI[sha256sum] = "5eee2e6d74b15ef96b13b3a2310c868ed2298e03341021e7d12a5a98a1d1e109"
 
Signature · 1 line
2.35.0