From: Fabian Keil Date: Tue, 23 Oct 2018 14:41:27 +0000 (+0200) Subject: Fix compiler warnings X-Git-Tag: v_3_0_27~35^2~1 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=b0dfc691e79ad10ecb87dfac4070a48b010adb6f Fix compiler warnings jcc.c:1012:27: warning: implicit conversion changes signedness: 'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion] jb_err_to_string(err)); ~~~~~~~~~~~~~~~~ ^~~ jcc.c:1721:45: warning: implicit conversion changes signedness: 'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion] csp->ip_addr_str, jb_err_to_string(err)); ~~~~~~~~~~~~~~~~ ^~~ --- diff --git a/errlog.c b/errlog.c index 21e062db..df5d09c9 100644 --- a/errlog.c +++ b/errlog.c @@ -974,7 +974,7 @@ void log_error(int loglevel, const char *fmt, ...) * Returns : A string with the jb_err translation * *********************************************************************/ -const char *jb_err_to_string(int jb_error) +const char *jb_err_to_string(jb_err jb_error) { switch (jb_error) { diff --git a/errlog.h b/errlog.h index 9abaad39..a5ae62b2 100644 --- a/errlog.h +++ b/errlog.h @@ -75,7 +75,7 @@ extern void disable_logging(void); extern void init_log_module(void); extern void show_version(const char *prog_name); extern void log_error(int loglevel, const char *fmt, ...); -extern const char *jb_err_to_string(int jb_error); +extern const char *jb_err_to_string(jb_err jb_error); #endif /* ndef ERRLOG_H_INCLUDED */