Annotate |ERR_add_error_dataf| as |OPENSSL_PRINTF_FORMAT_FUNC|. Besides being a good idea anyway, this avoids clang warning about using a non-literal format string when |ERR_add_error_dataf| calls |BIO_vsnprintf|. Change-Id: Iebc84d9c9d85e08e93010267d473387b661717a5 Reviewed-on: https://boringssl-review.googlesource.com/6920 Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/include/openssl/err.h b/include/openssl/err.h index 40361d7..7b3c306 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h
@@ -317,7 +317,8 @@ /* ERR_add_error_dataf takes a printf-style format and arguments, and sets the * result as the data on the most recent error. */ -OPENSSL_EXPORT void ERR_add_error_dataf(const char *format, ...); +OPENSSL_EXPORT void ERR_add_error_dataf(const char *format, ...) + OPENSSL_PRINTF_FORMAT_FUNC(1, 2); /* ERR_set_mark "marks" the most recent error for use with |ERR_pop_to_mark|. * It returns one if an error was marked and zero if there are no errors. */