summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-01-21 16:46:59 +1100
committerDaniel Black <daniel@mariadb.org>2021-01-21 16:46:59 +1100
commitf2fea295b4567cb919437d047b55e32ffdf26840 (patch)
treed7ede2c080a1d13f7a34a4cc6af88881a5c7c413 /strings
parentb22285e4821b49546de9b88990bbc9c453dc14b2 (diff)
downloadmariadb-git-f2fea295b4567cb919437d047b55e32ffdf26840.tar.gz
ucs2: cppcheck - add va_endbb-10.2-danielblack-cppcheck
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-ucs2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index c5182911c4a..29d56919633 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1160,9 +1160,12 @@ static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
+ size_t ret;
va_list args;
va_start(args,fmt);
- return my_vsnprintf_mb2(to, n, fmt, args);
+ ret= my_vsnprintf_mb2(to, n, fmt, args);
+ va_end(args);
+ return ret;
}
@@ -2424,9 +2427,12 @@ static size_t
my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
+ size_t ret;
va_list args;
va_start(args,fmt);
- return my_vsnprintf_utf32(to, n, fmt, args);
+ ret= my_vsnprintf_utf32(to, n, fmt, args);
+ va_end(args);
+ return ret;
}