From e43ead1d0b9c467af4a2af8f5177316a0ccb5602 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Wed, 12 Jul 2017 06:57:52 -0700 Subject: error: Implement the warn and free Error functions Implement warn_report_err() and warn_reportf_err() functions which are the same as the error_report_err() and error_reportf_err() functions except report a warning instead of an error. Signed-off-by: Alistair Francis Reviewed-by: Markus Armbruster Message-Id: <276ff93eadc0b01b8243cc61ffc331f77922c0d0.1499866456.git.alistair.francis@xilinx.com> Signed-off-by: Markus Armbruster --- include/qapi/error.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/qapi/error.h') diff --git a/include/qapi/error.h b/include/qapi/error.h index 7e532d00e9..af53b34410 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -266,11 +266,22 @@ void error_free(Error *err); */ void error_free_or_abort(Error **errp); +/* + * Convenience function to warn_report() and free @err. + */ +void warn_report_err(Error *err); + /* * Convenience function to error_report() and free @err. */ void error_report_err(Error *err); +/* + * Convenience function to error_prepend(), warn_report() and free @err. + */ +void warn_reportf_err(Error *err, const char *fmt, ...) + GCC_FMT_ATTR(2, 3); + /* * Convenience function to error_prepend(), error_report() and free @err. */ -- cgit 1.4.1