[src/openvpn/options.c:1163]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [src/openvpn/route.c:3187]: (warning) %d in format string (no. 5) requires 'int *' but the argument type is 'unsigned int *'.
v2: use "uint8_t" in options.c, thanks to Gert Doering Signed-off-by: Ilya Shipitsin <chipits...@gmail.com> --- src/openvpn/options.c | 4 ++-- src/openvpn/route.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index dcb6ecf..6aa72dc 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1147,7 +1147,7 @@ parse_hash_fingerprint(const char *str, int nbytes, int msglevel, struct gc_aren const char *cp = str; uint8_t *ret = (uint8_t *) gc_malloc(nbytes, true, gc); char term = 1; - int byte; + uint8_t byte; char bs[3]; for (i = 0; i < nbytes; ++i) @@ -1164,7 +1164,7 @@ parse_hash_fingerprint(const char *str, int nbytes, int msglevel, struct gc_aren { msg(msglevel, "format error in hash fingerprint hex byte: %s", str); } - ret[i] = (uint8_t)byte; + ret[i] = byte; term = *cp++; if (term != ':' && term != 0) { diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 08998d5..ecfa60f 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -3184,7 +3184,7 @@ get_default_gateway(struct route_gateway_info *rgi) unsigned int flags = 0; char name[16]; name[0] = 0; - const int np = sscanf(line, "%15s\t%x\t%x\t%x\t%*s\t%*s\t%d\t%x", + const int np = sscanf(line, "%15s\t%x\t%x\t%x\t%*s\t%*s\t%u\t%x", name, &net_x, &gw_x, -- 2.5.5 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel