diff mbox series

[meta-oe,28/63] raptor2: Match reutrn type from RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE

Message ID 20220904073417.3251865-28-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/63] libutempter: Upgrade to 1.2.2-alt1 | expand

Commit Message

Khem Raj Sept. 4, 2022, 7:33 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...e-from-RAPTOR_ASSERT_OBJECT_POINTER_.patch | 47 +++++++++++++++++++
 .../recipes-support/raptor2/raptor2_2.0.15.bb |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta-oe/recipes-support/raptor2/files/0001-Match-reutrn-type-from-RAPTOR_ASSERT_OBJECT_POINTER_.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/raptor2/files/0001-Match-reutrn-type-from-RAPTOR_ASSERT_OBJECT_POINTER_.patch b/meta-oe/recipes-support/raptor2/files/0001-Match-reutrn-type-from-RAPTOR_ASSERT_OBJECT_POINTER_.patch
new file mode 100644
index 0000000000..4c1afb46eb
--- /dev/null
+++ b/meta-oe/recipes-support/raptor2/files/0001-Match-reutrn-type-from-RAPTOR_ASSERT_OBJECT_POINTER_.patch
@@ -0,0 +1,47 @@ 
+From 97b5dcaa6b221eb403cc92e953225d38aee18f70 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 1 Sep 2022 14:48:39 -0700
+Subject: [PATCH] Match reutrn type from
+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE
+
+This ensures that integer type 0 is returned and not NULL
+Fixes
+raptor_serialize.c:243:66: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
+  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
+                                                                 ^~~~
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/raptor_parse.c     | 2 +-
+ src/raptor_serialize.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/raptor_parse.c b/src/raptor_parse.c
+index 26911f4..0091e1e 100644
+--- a/src/raptor_parse.c
++++ b/src/raptor_parse.c
+@@ -257,7 +257,7 @@ raptor_world_get_parser_factory(raptor_world *world, const char *name)
+ int
+ raptor_world_get_parsers_count(raptor_world* world)
+ {
+-  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
++  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0);
+ 
+   raptor_world_open(world);
+ 
+diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c
+index a1f29d7..2bf4ab2 100644
+--- a/src/raptor_serialize.c
++++ b/src/raptor_serialize.c
+@@ -240,7 +240,7 @@ raptor_get_serializer_factory(raptor_world* world, const char *name)
+ int
+ raptor_world_get_serializers_count(raptor_world* world)
+ {
+-  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
++  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0);
+ 
+   raptor_world_open(world);
+ 
+-- 
+2.37.3
+
diff --git a/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb b/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb
index 577c6ee00a..22306a5c1b 100644
--- a/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb
+++ b/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb
@@ -12,6 +12,7 @@  DEPENDS = "libxml2 libxslt curl yajl"
 SRC_URI = " \
     http://download.librdf.org/source/${BPN}-${PV}.tar.gz \
     file://0001-configure.ac-do-additional-checks-on-libxml2-also-wh.patch \
+    file://0001-Match-reutrn-type-from-RAPTOR_ASSERT_OBJECT_POINTER_.patch \
 "
 SRC_URI[md5sum] = "a39f6c07ddb20d7dd2ff1f95fa21e2cd"
 SRC_URI[sha256sum] = "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed"