diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-05-19 17:51:14 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-05-19 17:57:31 +0200 |
commit | f2cf41e1aeb1b8cb480ed8c0af74be4096e5bb23 (patch) | |
tree | 1ed58fba4ac294b9029789b465d9c90da6f21809 /dbus | |
parent | c64aa0308c72e31d9f7ab8fdea1132ad21372b83 (diff) | |
download | dbus-f2cf41e1aeb1b8cb480ed8c0af74be4096e5bb23.tar.gz |
dbus: fix unused warning
../../dbus/dbus-message.c:5462:17: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
5462 | unsigned char len;
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-message.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 45b1adfd..4c36aa39 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -5459,14 +5459,18 @@ oom: const char * _dbus_variant_get_signature (DBusVariant *self) { - unsigned char len; const char *ret; +#ifndef DBUS_DISABLE_ASSERT + unsigned char len; +#endif _dbus_assert (self != NULL); +#ifndef DBUS_DISABLE_ASSERT /* Here we make use of the fact that the serialization of a variant starts * with the 1-byte length, then that many bytes of signature, then \0. */ len = _dbus_string_get_byte (&self->data, 0); +#endif ret = _dbus_string_get_const_data_len (&self->data, 1, len); _dbus_assert (strlen (ret) == len); return ret; |