mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
tests: Fix an incorrect array length in stream-rw_all test
The array was declared one byte too short to contain the trailing nul byte for the string literal. Spotted by gcc 15. Fix it by allowing the compiler to work out the array length. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -119,10 +119,10 @@ static void
|
||||
test_read_all_async_memory (void)
|
||||
{
|
||||
GInputStream *ms;
|
||||
gchar b[24] = "0123456789ABCDEFGHIJ!@#$";
|
||||
gchar b[] = "0123456789ABCDEFGHIJ!@#$";
|
||||
gchar buf[10];
|
||||
|
||||
ms = g_memory_input_stream_new_from_data (b, sizeof b, NULL);
|
||||
ms = g_memory_input_stream_new_from_data (b, strlen (b), NULL);
|
||||
|
||||
g_input_stream_read_all_async (ms, buf, 10, 0, NULL, read_done, NULL);
|
||||
wait_for_read (TRUE, 10);
|
||||
|
Reference in New Issue
Block a user