Skip to content

Commit

Permalink
imapd.c: declare [[noreturn]] shut_down before service_abort
Browse files Browse the repository at this point in the history
Otherwise, clang fails with

     error: function declared 'noreturn' should not return
     [-Werror,-Winvalid-noreturn]
  • Loading branch information
rsto committed Jan 10, 2025
1 parent 5d4625d commit 662d749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imap/imapd.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ extern int saslserver(sasl_conn_t *conn, const char *mech,
/* Enable the resetting of a sasl_conn_t */
static int reset_saslconn(sasl_conn_t **conn);

void shut_down(int code) __attribute__((noreturn));

static int imapd_canon_user(sasl_conn_t *conn, void *context,
const char *user, unsigned ulen,
unsigned flags, const char *user_realm,
Expand Down Expand Up @@ -1314,7 +1316,6 @@ static void motd_file(void)
/*
* Cleanly shut down and exit
*/
void shut_down(int code) __attribute__((noreturn));
void shut_down(int code)
{
int i;
Expand Down

0 comments on commit 662d749

Please sign in to comment.