From 194854b2218cba6241e7c9d4ee931a4d84a75536 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 15 Jul 2019 18:18:03 -0700 Subject: [PATCH] Fix format security warning in newer GCC In OpenWrt, -Werror=format-string is passed, making this fail compilation. printf style functions are meant to work with format strings anyway. --- src/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io.c b/src/io.c index 9c4fa9fb..f7b9ec23 100644 --- a/src/io.c +++ b/src/io.c @@ -62,7 +62,7 @@ nc_ssl_error_get_reasons(void) ERRMEM; return NULL; } - reason_len += sprintf(reasons + reason_len, ERR_reason_error_string(e)); + reason_len += sprintf(reasons + reason_len, "%s", ERR_reason_error_string(e)); } return reasons;