mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-28 23:16:14 +01:00
tests: Initialise an array’s elements to NULL
This is not strictly necessary, but helps scan-build understand that the `g_thread_join()` calls are not going to use uninitialised `GThread` pointers. It can’t reason that the number of loop iterations on the `g_thread_create()` and `g_thread_join()` loops are identical. Fixes: ``` ../../../glib/tests/mutex.c:271:5: warning: 1st function call argument is an uninitialized value [core.CallAndMessage] 271 | g_thread_join (threads[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
472aef8278
commit
61ce6d5511
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user