diff --git a/gio/gfilteroutputstream.c b/gio/gfilteroutputstream.c index cb1602ef3..4fc82d45c 100644 --- a/gio/gfilteroutputstream.c +++ b/gio/gfilteroutputstream.c @@ -89,7 +89,7 @@ g_filter_output_stream_class_init (GFilterOutputStreamClass *klass) ostream_class->close_fn = g_filter_output_stream_close; /** - * GFilterOutputStream:close-base-stream: + * GFilterOutputStream:base-stream: * * The underlying base stream on which the I/O ops will be done. */ diff --git a/glib/gfileutils.c b/glib/gfileutils.c index f40400ca5..25500cbf5 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -2991,6 +2991,7 @@ g_get_current_dir (void) { /* Fallback return value */ g_assert (buffer_size >= 2); + g_assert (buffer != NULL); buffer[0] = G_DIR_SEPARATOR; buffer[1] = 0; } diff --git a/glib/goption.c b/glib/goption.c index 8ac283ce4..170b88dd2 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -2559,7 +2559,7 @@ g_option_context_get_description (GOptionContext *context) /** * g_option_context_parse_strv: * @context: a #GOptionContext - * @arguments: (inout) (array null-terminated=1) (optional): a pointer + * @arguments: (inout) (array zero-terminated=1) (optional): a pointer * to the command line arguments (which must be in UTF-8 on Windows). * Starting with GLib 2.62, @arguments can be %NULL, which matches * g_option_context_parse(). diff --git a/glib/gtestutils.c b/glib/gtestutils.c index 9e9ee1e82..47bb9c66a 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -611,7 +611,7 @@ /** * g_assert_no_error: - * @err: (nullable) a `GError` + * @err: (nullable): a `GError` * * Debugging macro to check that a [struct@GLib.Error] is not set. * diff --git a/glib/tests/error.c b/glib/tests/error.c index 8dd40aa56..cdd6b1e3c 100644 --- a/glib/tests/error.c +++ b/glib/tests/error.c @@ -258,6 +258,8 @@ typedef struct static void test_error_private_init (TestErrorPrivate *priv) { + g_assert_nonnull (priv); + priv->foo = 13; /* If that triggers, it's test bug. */ @@ -272,15 +274,20 @@ static void test_error_private_copy (const TestErrorPrivate *src_priv, TestErrorPrivate *dest_priv) { + g_assert_nonnull (src_priv); + g_assert_nonnull (dest_priv); + dest_priv->foo = src_priv->foo; dest_priv->check = src_priv->check; + g_assert_nonnull (dest_priv->check); dest_priv->check->copy_called++; } static void test_error_private_clear (TestErrorPrivate *priv) { + g_assert_nonnull (priv->check); priv->check->free_called++; } @@ -291,6 +298,7 @@ fill_test_error (GError *error, TestErrorCheck *check) { TestErrorPrivate *test_error = test_error_get_private (error); + g_assert_nonnull (test_error); test_error->check = check; return test_error; @@ -326,6 +334,7 @@ test_extended (void) g_assert_cmpstr (error->message, ==, copy_error->message); copy_test_priv = test_error_get_private (copy_error); + g_assert_nonnull (copy_test_priv); g_assert_cmpint (test_priv->foo, ==, copy_test_priv->foo); g_error_free (error); diff --git a/glib/tests/mutex.c b/glib/tests/mutex.c index bd484c59e..5a089a099 100644 --- a/glib/tests/mutex.c +++ b/glib/tests/mutex.c @@ -246,7 +246,7 @@ static void test_mutex_perf (gconstpointer data) { const guint n_threads = GPOINTER_TO_UINT (data); - GThread *threads[THREADS]; + GThread *threads[THREADS] = { NULL, }; gint64 start_time; gdouble rate; gint x = -1;