From 3963e717f3ed36f910f2718620a74f2cef2eb510 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 10 Jan 2024 12:40:15 +0100 Subject: [PATCH] mx_mysql: Add a unused_result warning All callers were made to handle errors returned by mx_mysql_option_set_default_file() in thee previou commit. Now add the function attribute `warn_unused_result` to it, so that future callers will do, too. --- mx_mysql.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mx_mysql.h b/mx_mysql.h index 17f5a06b..0bf2c815 100644 --- a/mx_mysql.h +++ b/mx_mysql.h @@ -77,7 +77,7 @@ struct mx_mysql_stmt { int mx_mysql_initialize(struct mx_mysql **mysql); -int mx_mysql_option_set_default_file(struct mx_mysql *mysql, char *fname); +int mx_mysql_option_set_default_file(struct mx_mysql *mysql, char *fname) __attribute__ ((warn_unused_result)); int mx_mysql_option_set_default_group(struct mx_mysql *mysql, char *group); int mx_mysql_option_set_reconnect(struct mx_mysql *mysql, int reconnect);