From: Lee Date: Mon, 7 Jan 2019 05:17:08 +0000 (-0500) Subject: fix cppcheck warnings in cgisimple.c X-Git-Tag: v_3_0_29~620 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=9af1c10430e565c42000cbe559029bee5ebd681a fix cppcheck warnings in cgisimple.c [cgisimple.c:308]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [cgisimple.c:404]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. --- diff --git a/cgisimple.c b/cgisimple.c index 79b811f9..5711087e 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -308,7 +308,7 @@ static void cgi_create_client_tag_form(char *form, size_t size, snprintf(form, size, "
\n" " \n" - " \n" + " \n" " \n" " \n" "
", tag, toggle_state, !expires, button_name); @@ -401,7 +401,7 @@ jb_err cgi_show_client_tags(struct client_state *csp, refresh_delay = get_next_tag_timeout_for_client(csp->client_address); if (refresh_delay != 0) { - snprintf(buf, sizeof(buf), "%d", csp->config->client_tag_lifetime); + snprintf(buf, sizeof(buf), "%u", csp->config->client_tag_lifetime); if (map(exports, "refresh-delay", 1, buf, 1)) { free_map(exports);