mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 23:03:27 +01:00
mark exit_toxic_* functions as noreturn
This commit is contained in:
parent
79bde4e5bf
commit
a862874740
@ -102,7 +102,7 @@ static void init_signal_catchers(void)
|
|||||||
signal(SIGSEGV, catch_SIGSEGV);
|
signal(SIGSEGV, catch_SIGSEGV);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_toxic_success(Tox *m)
|
noreturn void exit_toxic_success(Tox *m)
|
||||||
{
|
{
|
||||||
store_data(m, DATA_FILE);
|
store_data(m, DATA_FILE);
|
||||||
close_all_file_senders(m);
|
close_all_file_senders(m);
|
||||||
@ -124,7 +124,7 @@ void exit_toxic_success(Tox *m)
|
|||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_toxic_err(const char *errmsg, int errcode)
|
noreturn void exit_toxic_err(const char *errmsg, int errcode)
|
||||||
{
|
{
|
||||||
if (errmsg == NULL)
|
if (errmsg == NULL)
|
||||||
errmsg = "No error message";
|
errmsg = "No error message";
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stdnoreturn.h>
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
|
||||||
#include <tox/tox.h>
|
#include <tox/tox.h>
|
||||||
@ -85,8 +86,8 @@ typedef enum _FATAL_ERRS {
|
|||||||
Uncomment if necessary */
|
Uncomment if necessary */
|
||||||
/* #define URXVT_FIX */
|
/* #define URXVT_FIX */
|
||||||
|
|
||||||
void exit_toxic_success(Tox *m);
|
noreturn void exit_toxic_success(Tox *m);
|
||||||
void exit_toxic_err(const char *errmsg, int errcode);
|
noreturn void exit_toxic_err(const char *errmsg, int errcode);
|
||||||
|
|
||||||
int store_data(Tox *m, char *path);
|
int store_data(Tox *m, char *path);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user