diff options
author | Federico Mena Quintero <federico@gnome.org> | 2021-12-14 16:14:00 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2021-12-14 16:14:44 -0600 |
commit | ae90cda15b5edc23c72f994b4da9b39c965afdd1 (patch) | |
tree | 9d1f2eb06feab526b468859914648b7f1d1acea3 /dbind | |
parent | a83d169caae718fa697be7a983754c49f52ed72c (diff) | |
download | at-spi2-core-ae90cda15b5edc23c72f994b4da9b39c965afdd1.tar.gz |
dbtest:demarshal() - Assert that the message is iterable, or things will go really bad down the line
Fixes static-scan warnings of this kind:
../../../dbind/dbtest.c:83:18: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
g_assert (v2 == 42);
~~ ^
Diffstat (limited to 'dbind')
-rw-r--r-- | dbind/dbtest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dbind/dbtest.c b/dbind/dbtest.c index 085d7ffb..511839c3 100644 --- a/dbind/dbtest.c +++ b/dbind/dbtest.c @@ -40,7 +40,10 @@ void demarshal (DBusMessage *msg, const char *type, void *ptr) DBusMessageIter iter; if (!dbus_message_iter_init (msg, &iter)) + { fprintf (stderr, "no data in msg\n"); + g_assert_not_reached (); + } else dbind_any_demarshal (&iter, &type, &ptr); } |