Bug 71811 - dbus_g_value_build_g_variant() fails on empty strv
Summary: dbus_g_value_build_g_variant() fails on empty strv
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Rob Taylor
QA Contact:
URL: http://cgit.collabora.com/git/user/xc...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-11-19 21:16 UTC by Xavier Claessens
Modified: 2014-01-14 11:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Xavier Claessens 2013-11-19 21:16:13 UTC
g_variant_new_strv(NULL, -1); warns because NULL is not an array. (NULL, 0) is explicitly accepted though.
Comment 2 Xavier Claessens 2013-11-19 21:43:50 UTC
Added a 2nd patch to fix the NULL string case. g_value_set_string() is accepted, but not g_variant_new_string().
Comment 3 Xavier Claessens 2013-11-19 21:44:33 UTC
(In reply to comment #2)
> Added a 2nd patch to fix the NULL string case. g_value_set_string() is
> accepted, but not g_variant_new_string().

I mean: g_value_set_string(v, NULL) is accepted, but not g_variant_new_string(NULL).
Comment 4 Simon McVittie 2013-11-20 13:16:08 UTC
Looks good. Please commit if you can, or if you can't, I'll merge this next time I do a round of dbus merges.
Comment 5 Xavier Claessens 2013-11-20 15:35:50 UTC
I can't push myself, please do :)
Comment 6 Simon McVittie 2014-01-14 11:17:02 UTC
Fixed in git for 0.102, thanks


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.