]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix mismatch of fprintf format specifier and argument type
authorJonathan K. Bullard <jkbullard@gmail.com>
Fri, 6 Feb 2015 19:49:10 +0000 (14:49 -0500)
committerGert Doering <gert@greenie.muc.de>
Sat, 7 Feb 2015 11:24:27 +0000 (12:24 +0100)
This fixes a warning about a mismatch between a fprintf format string
and an argument type on Darwin-64-bit builds:

%lu specifies type 'unsigned long' but the argument has type
'__darwin_suseconds_t' (aka 'int')

Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <CAEsd45SoC+h5tcDraZcQN_MUYzqWYOVvNpkwMo190DLpB32StQ@mail.gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9446

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/error.c

index 9d52962ae76e08e05b952bb3d6359cdbcf97ad0b..77b6cec06baabe9b25a195458e6dd9fa2f7ca31b 100644 (file)
@@ -319,7 +319,7 @@ void x_msg_va (const unsigned int flags, const char *format, va_list arglist)
 
              fprintf (fp, "%lu.%06lu %x %s%s%s%s",
                       tv.tv_sec,
-                      tv.tv_usec,
+                      (unsigned long)tv.tv_usec,
                       flags,
                       prefix,
                       prefix_sep,