Skip to content

Commit f53dfcf

Browse files
committed
fix c-warnings; fix CI
1 parent bb72702 commit f53dfcf

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

ext/mysql2/client.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ static VALUE rb_raise_mysql2_error(mysql_client_wrapper *wrapper) {
129129
UINT2NUM(mysql_errno(wrapper->client)),
130130
rb_sql_state);
131131
rb_exc_raise(e);
132-
return Qnil;
133132
}
134133

135134
static void *nogvl_init(void *ptr) {
@@ -525,8 +524,6 @@ static VALUE disconnect_and_raise(VALUE self, VALUE error) {
525524
}
526525

527526
rb_exc_raise(error);
528-
529-
return Qnil;
530527
}
531528

532529
static VALUE do_query(void *args) {

ext/mysql2/mysql2_ext.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ void Init_mysql2(void);
2929
#endif
3030

3131
#if defined(__GNUC__) && (__GNUC__ >= 3)
32+
#define RB_MYSQL_NORETURN __attribute__ ((noreturn))
3233
#define RB_MYSQL_UNUSED __attribute__ ((unused))
3334
#else
35+
#define RB_MYSQL_NORETURN
3436
#define RB_MYSQL_UNUSED
3537
#endif
3638

ext/mysql2/statement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ void init_mysql2_statement(void);
1313
void decr_mysql2_stmt(mysql_stmt_wrapper *stmt_wrapper);
1414

1515
VALUE rb_mysql_stmt_new(VALUE rb_client, VALUE sql);
16-
void rb_raise_mysql2_stmt_error(mysql_stmt_wrapper *stmt_wrapper);
16+
void rb_raise_mysql2_stmt_error(mysql_stmt_wrapper *stmt_wrapper) RB_MYSQL_NORETURN;
1717

1818
#endif

0 commit comments

Comments
 (0)