Commit dccb15cc authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Pavel Emelyanov

zdtm: fix compilation in test_msg()

cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0   -c -o msg.o msg.c
msg.c: In function ‘test_msg’:
msg.c:40:6: error: variable ‘len’ set but not used [-Werror=unused-but-set-variable]
Signed-off-by: 's avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 720cab0b
......@@ -37,7 +37,7 @@ int test_log_init(const char *fname, const char *suffix)
void test_msg(const char *format, ...)
{
va_list arg;
int len, off = 0;
int off = 0;
char buf[PAGE_SIZE];
struct timeval tv;
struct tm *tm;
......@@ -53,7 +53,7 @@ void test_msg(const char *format, ...)
off += sprintf(buf + off, ".%.3ld: ", tv.tv_usec / 1000);
off += sprintf(buf + off, "%5d: ", getpid());
va_start(arg, format);
len = vsnprintf(buf + off, sizeof(buf) - off, format, arg);
off += vsnprintf(buf + off, sizeof(buf) - off, format, arg);
va_end(arg);
fprintf(stderr, buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment