projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t/axmap: use a 64-bit type (not size_t) for axmap tests
[fio.git]
/
lib
/
nowarn_snprintf.h
diff --git
a/lib/nowarn_snprintf.h
b/lib/nowarn_snprintf.h
index 5c0f4d44e4edff657b0bb5ea4a3dc52e6b0a51a5..81a6d10849c7edd49f585a027db6399d305cd94f 100644
(file)
--- a/
lib/nowarn_snprintf.h
+++ b/
lib/nowarn_snprintf.h
@@
-8,17
+8,20
@@
static inline int nowarn_snprintf(char *str, size_t size, const char *format,
...)
{
va_list args;
...)
{
va_list args;
+ int res;
va_start(args, format);
#if __GNUC__ -0 >= 8
#pragma GCC diagnostic push "-Wformat-truncation"
#pragma GCC diagnostic ignored "-Wformat-truncation"
#endif
va_start(args, format);
#if __GNUC__ -0 >= 8
#pragma GCC diagnostic push "-Wformat-truncation"
#pragma GCC diagnostic ignored "-Wformat-truncation"
#endif
- re
turn
vsnprintf(str, size, format, args);
+ re
s =
vsnprintf(str, size, format, args);
#if __GNUC__ -0 >= 8
#pragma GCC diagnostic pop "-Wformat-truncation"
#endif
va_end(args);
#if __GNUC__ -0 >= 8
#pragma GCC diagnostic pop "-Wformat-truncation"
#endif
va_end(args);
+
+ return res;
}
#endif
}
#endif