From f9da15db10e31c9e1569c105adc29cf80aaf4811 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sun, 31 Mar 2019 03:47:38 +0200 Subject: eel-string: Use 'va_copy' instead of 'G_VA_COPY' Fixes cppcheck warnings: [eel-string.c:681]: (error) va_list 'va' used before va_start() was called. [eel-string.c:682]: (error) va_list 'va' used before va_start() was called. [eel-string.c:683]: (error) va_list 'va' used before va_start() was called. [eel-string.c:684]: (error) va_list 'va' used before va_start() was called. [eel-string.c:697]: (error) va_list 'va' used before va_start() was called. [eel-string.c:698]: (error) va_list 'va' used before va_start() was called. [eel-string.c:699]: (error) va_list 'va' used before va_start() was called. [eel-string.c:700]: (error) va_list 'va' used before va_start() was called. [eel-string.c:709]: (error) va_list 'va' used before va_start() was called. [eel-string.c:710]: (error) va_list 'va' used before va_start() was called. [eel-string.c:714]: (error) va_list 'va' used before va_start() was called. [eel-string.c:720]: (error) va_list 'va' used before va_start() was called. [eel-string.c:722]: (error) va_list 'va' used before va_start() was called. --- eel/eel-string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eel') diff --git a/eel/eel-string.c b/eel/eel-string.c index a4202ad8..a4bdb75c 100644 --- a/eel/eel-string.c +++ b/eel/eel-string.c @@ -683,7 +683,7 @@ eel_strdup_vprintf_with_custom (EelPrintfHandler *custom, { char *val; - G_VA_COPY(va, va_orig); + va_copy (va, va_orig); skip_to_arg (&va, args, custom, conversions[i].precision_pos); val = g_strdup_vprintf ("%d", va); va_end (va); @@ -699,7 +699,7 @@ eel_strdup_vprintf_with_custom (EelPrintfHandler *custom, { char *val; - G_VA_COPY(va, va_orig); + va_copy (va, va_orig); skip_to_arg (&va, args, custom, conversions[i].width_pos); val = g_strdup_vprintf ("%d", va); va_end (va); @@ -711,7 +711,7 @@ eel_strdup_vprintf_with_custom (EelPrintfHandler *custom, g_free (val); } - G_VA_COPY(va, va_orig); + va_copy (va, va_orig); skip_to_arg (&va, args, custom, conversions[i].arg_pos); type = args[conversions[i].arg_pos]; if (type < 0) -- cgit v1.2.1