bandb/bandb.c: misc cleanup for compiler warnings
bandb.c:243:1: warning: function 'error_cb' could be declared with attribute 'noreturn' [-Wmissing-noreturn] bandb.c:289:1: warning: function 'db_error_cb' could be declared with attribute 'noreturn' [-Wmissing-noreturn] bandb.c:293:13: warning: signed shift result (0x80000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Wshift-sign-overflow]
This commit is contained in:
parent
81ae0a7d1b
commit
a8517ee77c
1 changed files with 3 additions and 3 deletions
|
@ -238,7 +238,7 @@ parse_request(rb_helper *helper)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
error_cb(rb_helper *helper)
|
||||
{
|
||||
if(in_transaction)
|
||||
|
@ -284,13 +284,13 @@ setup_signals(void)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
static void __attribute__((noreturn))
|
||||
db_error_cb(const char *errstr)
|
||||
{
|
||||
char buf[256];
|
||||
rb_snprintf(buf, sizeof(buf), "! :%s", errstr);
|
||||
rb_helper_write(bandb_helper, "%s", buf);
|
||||
rb_sleep(2 << 30, 0);
|
||||
rb_sleep(1 << 30, 0);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue