summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-22 22:09:16 +0100
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:59:04 +0200
commit9704e5100d5779b9cf7f6085796c54ef4efbe6a1 (patch)
tree0c132b420a44282ebe92e89c8e10bbc4bee2e96d /src
parent724b3357d908de72253f0b93eb41f0b4ac5df66d (diff)
basic/log: voidify snprintf statements
The buffers are fixed size, so the message may not fit, but we don't particularly care.
Diffstat (limited to 'src')
-rw-r--r--src/basic/log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index 1c8f6ec66..bd9d55a17 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -377,7 +377,7 @@ static int write_to_console(
highlight = LOG_PRI(level) <= LOG_ERR && show_color;
if (show_location) {
- snprintf(location, sizeof(location), "(%s:%i) ", file, line);
+ (void) snprintf(location, sizeof location, "(%s:%i) ", file, line);
iovec[n++] = IOVEC_MAKE_STRING(location);
}
@@ -714,7 +714,7 @@ int log_internalv_realm(
if (error != 0)
errno = error;
- vsnprintf(buffer, sizeof(buffer), format, ap);
+ (void) vsnprintf(buffer, sizeof buffer, format, ap);
return log_dispatch_internal(level, error, file, line, func, NULL, NULL, NULL, NULL, buffer);
}
@@ -773,7 +773,7 @@ int log_object_internalv(
} else
b = buffer = newa(char, LINE_MAX);
- vsnprintf(b, LINE_MAX, format, ap);
+ (void) vsnprintf(b, LINE_MAX, format, ap);
return log_dispatch_internal(level, error, file, line, func,
object_field, object, extra_field, extra, buffer);
@@ -816,7 +816,7 @@ static void log_assert(
return;
DISABLE_WARNING_FORMAT_NONLITERAL;
- snprintf(buffer, sizeof buffer, format, text, file, line, func);
+ (void) snprintf(buffer, sizeof buffer, format, text, file, line, func);
REENABLE_WARNING;
log_abort_msg = buffer;
@@ -992,7 +992,7 @@ int log_struct_internal(
errno = error;
va_copy(aq, ap);
- vsnprintf(buf, sizeof(buf), format, aq);
+ (void) vsnprintf(buf, sizeof buf, format, aq);
va_end(aq);
if (startswith(buf, "MESSAGE=")) {
@@ -1295,7 +1295,7 @@ int log_syntax_internal(
errno = error;
va_start(ap, format);
- vsnprintf(buffer, sizeof(buffer), format, ap);
+ (void) vsnprintf(buffer, sizeof buffer, format, ap);
va_end(ap);
if (unit)