Skip to content

Commit

Permalink
mx_mysql: Add a unused_result warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
donald committed Jan 10, 2024
1 parent 9333710 commit 3963e71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mx_mysql.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3963e71

Please sign in to comment.