blob: 4c1afb46eb1654b86567fbe3a4f40a837a352dfa [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From 97b5dcaa6b221eb403cc92e953225d38aee18f70 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 1 Sep 2022 14:48:39 -0700
4Subject: [PATCH] Match reutrn type from
5 RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE
6
7This ensures that integer type 0 is returned and not NULL
8Fixes
9raptor_serialize.c:243:66: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
10 RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
11 ^~~~
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/raptor_parse.c | 2 +-
16 src/raptor_serialize.c | 2 +-
17 2 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/src/raptor_parse.c b/src/raptor_parse.c
20index 26911f4..0091e1e 100644
21--- a/src/raptor_parse.c
22+++ b/src/raptor_parse.c
23@@ -257,7 +257,7 @@ raptor_world_get_parser_factory(raptor_world *world, const char *name)
24 int
25 raptor_world_get_parsers_count(raptor_world* world)
26 {
27- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
28+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0);
29
30 raptor_world_open(world);
31
32diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c
33index a1f29d7..2bf4ab2 100644
34--- a/src/raptor_serialize.c
35+++ b/src/raptor_serialize.c
36@@ -240,7 +240,7 @@ raptor_get_serializer_factory(raptor_world* world, const char *name)
37 int
38 raptor_world_get_serializers_count(raptor_world* world)
39 {
40- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
41+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0);
42
43 raptor_world_open(world);
44
45--
462.37.3
47