mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
Merge branch 'scan-build-fixes' into 'main'
A few test improvements for scan-build See merge request GNOME/glib!3080
This commit is contained in:
commit
92f39d37c5
@ -757,11 +757,15 @@ on_communicate_complete (GObject *proc,
|
||||
{
|
||||
if (data->is_utf8)
|
||||
{
|
||||
g_assert_nonnull (stdout_str);
|
||||
stdout_data = (guint8*)stdout_str;
|
||||
stdout_len = strlen (stdout_str);
|
||||
}
|
||||
else
|
||||
stdout_data = g_bytes_get_data (stdout_bytes, &stdout_len);
|
||||
{
|
||||
g_assert_nonnull (stdout_bytes);
|
||||
stdout_data = g_bytes_get_data (stdout_bytes, &stdout_len);
|
||||
}
|
||||
|
||||
g_assert_cmpmem (stdout_data, stdout_len, "# hello world" LINEEND, 13 + strlen (LINEEND));
|
||||
}
|
||||
|
@ -212,7 +212,7 @@
|
||||
#endif
|
||||
|
||||
/* special helpers to avoid gmessage.c dependency */
|
||||
static void mem_error (const char *format, ...) G_GNUC_PRINTF (1,2);
|
||||
G_NORETURN static void mem_error (const char *format, ...) G_GNUC_PRINTF (1,2) G_ANALYZER_NORETURN;
|
||||
#define mem_assert(cond) do { if (G_LIKELY (cond)) ; else mem_error ("assertion failed: %s", #cond); } while (0)
|
||||
|
||||
/* --- structures --- */
|
||||
|
@ -983,6 +983,10 @@ gvs_tuple_needed_size (GVariantTypeInfo *type_info,
|
||||
|
||||
offset = 0;
|
||||
|
||||
/* We must go through at least one iteration below. If the tuple had no
|
||||
* children, it would have a fixed size. */
|
||||
g_assert (n_children > 0);
|
||||
|
||||
for (i = 0; i < n_children; i++)
|
||||
{
|
||||
guint alignment;
|
||||
|
Loading…
Reference in New Issue
Block a user