tests: Add some return value checking to pacify Coverity
No real problems here, but Coverity likes to see consistent checking of return values, and I agree with it. Coverity CID: 1452213 Coverity CID: 1452211 Closes: #1037 Approved by: jlebon
This commit is contained in:
parent
fbefe875c7
commit
36ab8cd0e1
|
|
@ -94,7 +94,7 @@ httpd_log (OtTrivialHttpd *httpd, const gchar *format, ...)
|
||||||
g_string_append_vprintf (str, format, args);
|
g_string_append_vprintf (str, format, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
g_output_stream_write_all (httpd->log, str->str, str->len, &written, NULL, NULL);
|
(void)g_output_stream_write_all (httpd->log, str->str, str->len, &written, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ test_bsdiff (void)
|
||||||
bsdiff_stream.opaque = out;
|
bsdiff_stream.opaque = out;
|
||||||
g_assert_cmpint (bsdiff (old, OLD_SIZE, new, NEW_SIZE, &bsdiff_stream), ==, 0);
|
g_assert_cmpint (bsdiff (old, OLD_SIZE, new, NEW_SIZE, &bsdiff_stream), ==, 0);
|
||||||
|
|
||||||
g_output_stream_close (out, NULL, NULL);
|
g_assert (g_output_stream_close (out, NULL, NULL));
|
||||||
|
|
||||||
/* Now generate NEW_GENERATED from OLD and OUT. */
|
/* Now generate NEW_GENERATED from OLD and OUT. */
|
||||||
{ g_autoptr(GBytes) bytes = g_memory_output_stream_steal_as_bytes (G_MEMORY_OUTPUT_STREAM (out));
|
{ g_autoptr(GBytes) bytes = g_memory_output_stream_steal_as_bytes (G_MEMORY_OUTPUT_STREAM (out));
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,10 @@ test_mutable_tree_walk (void)
|
||||||
glnx_unref_object OstreeMutableTree *subdir = NULL;
|
glnx_unref_object OstreeMutableTree *subdir = NULL;
|
||||||
glnx_unref_object OstreeMutableTree *a = NULL;
|
glnx_unref_object OstreeMutableTree *a = NULL;
|
||||||
g_autofree char *source_checksum = NULL;
|
g_autofree char *source_checksum = NULL;
|
||||||
ostree_mutable_tree_lookup (tree, "a", &source_checksum, &a, &error);
|
g_assert (ostree_mutable_tree_lookup (tree, "a", &source_checksum, &a, &error));
|
||||||
|
g_assert_no_error (error);
|
||||||
g_assert (ostree_mutable_tree_walk (a, split_path, 1, &subdir, &error));
|
g_assert (ostree_mutable_tree_walk (a, split_path, 1, &subdir, &error));
|
||||||
|
g_assert_no_error (error);
|
||||||
g_assert (subdir);
|
g_assert (subdir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue