qdict: fix unbounded stack warning for qdict_array_entries
authorPeter Xu <peterx@redhat.com>
Tue, 22 Mar 2016 02:37:26 +0000 (10:37 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 18 May 2016 12:04:26 +0000 (15:04 +0300)
commitde4905f4bc645ad2991b9b535e8902f81abaf8c7
treea2eed6048beac6592301a05463534023c43547a9
parent1d817db3a07774999606f62aa2d8772a82363551
qdict: fix unbounded stack warning for qdict_array_entries

Here we use one g_strdup_printf() to replace the two stack allocated
array, considering it's more convenient, safe, and as long as it's
called rarely only when quorum device opens. This will remove the
unbound stack warning when compiling with "-Wstack-usage=1000000".

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qobject/qdict.c