From e98aabd114aa5d86d41b0da50c720fda58cd3b1e Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sun, 3 May 2015 12:09:22 +0100 Subject: documents: Assert that parsing a known JSON string member succeeds gdata_parser_string_from_json_member() should return TRUE iff it matched the given member (even if parsing fails). Since the member name comes from a loop over the existing members, this should always succeed. Spotted by Coverity. CID: #109873 --- gdata/services/documents/gdata-documents-document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdata/services') diff --git a/gdata/services/documents/gdata-documents-document.c b/gdata/services/documents/gdata-documents-document.c index 625a7e8f..46d0a295 100644 --- a/gdata/services/documents/gdata-documents-document.c +++ b/gdata/services/documents/gdata-documents-document.c @@ -295,7 +295,7 @@ parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GEr format = json_reader_get_member_name (reader); - gdata_parser_string_from_json_member (reader, format, P_REQUIRED | P_NON_EMPTY, &uri, &success, NULL); + g_assert (gdata_parser_string_from_json_member (reader, format, P_REQUIRED | P_NON_EMPTY, &uri, &success, NULL)); if (success) { g_hash_table_insert (priv->export_links, g_strdup (format), uri); uri = NULL; -- cgit v1.2.1