X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=36d47994c073b6fda784086378d3ffbc47934dce;hp=933729a26c9e530570a8bf01418f6e839fcf535d;hb=9864bc0d0bc68fd885187bf92c5271db56888ea1;hpb=474294f88806259e54fafe6cfd10287909868c99 diff --git a/gui.c b/gui.c index 933729a2..36d47994 100644 --- a/gui.c +++ b/gui.c @@ -489,7 +489,7 @@ static int add_output_line(char *line, __a_unused void *data) return 1; } -void para_log(int ll, const char *fmt,...) +__printf_2_3 void para_log(int ll, const char *fmt,...) { int color; char *msg; @@ -523,7 +523,7 @@ static void setup_signal_handling(void) signal(SIGHUP, SIG_IGN); } -static void do_exit(int ret) +__noreturn static void do_exit(int ret) { signal(SIGTERM, SIG_IGN); kill(0, SIGTERM); @@ -539,7 +539,7 @@ static void shutdown_curses(void) endwin(); } -static void finish(int ret) +__noreturn static void finish(int ret) { shutdown_curses(); do_exit(ret); @@ -548,7 +548,7 @@ static void finish(int ret) /* * exit curses and print given message to stdout/stderr */ -__printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) +__noreturn __printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) { va_list argp; FILE *outfd = ret? stderr: stdout; @@ -858,13 +858,13 @@ static void handle_signal(int sig) } return; case SIGINT: - PARA_WARNING_LOG("%s", "caught SIGINT, reset"); + PARA_WARNING_LOG("caught SIGINT, reset"); /* Nothing to do. SIGINT killed our child, para_client stat. * This get noticed by do_select which resets everything */ return; case SIGUSR1: - PARA_NOTICE_LOG("%s", "got SIGUSR1, rereading configuration"); + PARA_NOTICE_LOG("got SIGUSR1, rereading configuration"); com_reread_conf(); return; case SIGCHLD: @@ -1006,9 +1006,9 @@ static int send_output(void) return ret; } if (do_select(COMMAND_MODE) >= 0) - PARA_INFO_LOG("%s", "command complete"); + PARA_INFO_LOG("command complete"); else - PARA_NOTICE_LOG("%s", "command aborted"); + PARA_NOTICE_LOG("command aborted"); print_in_bar(COLOR_MSG, " "); return 1; } @@ -1181,7 +1181,7 @@ static void com_ll_incr(void) { if (conf.loglevel_arg >= EMERG) { print_in_bar(COLOR_ERRMSG, - "loglevel already at miminal verbosity\n"); + "loglevel already at minimal verbosity\n"); return; } conf.loglevel_arg++; @@ -1202,13 +1202,13 @@ static void com_reread_conf(void) }; if (!cf) { - PARA_WARNING_LOG("%s", "there is no configuration to read"); + PARA_WARNING_LOG("there is no configuration to read"); return; } - PARA_INFO_LOG("%s", "rereading command line options and config file"); + PARA_INFO_LOG("rereading command line options and config file"); gui_cmdline_parser(_argc, _argv, &conf); gui_cmdline_parser_config_file(cf, &conf, ¶ms); - PARA_NOTICE_LOG("%s", "config file reloaded"); + PARA_NOTICE_LOG("config file reloaded"); if (check_key_map_args() < 0) finish(EXIT_FAILURE); } @@ -1253,7 +1253,7 @@ static void com_help(void) static void com_shrink_top_win(void) { if (top.lines <= theme.top_lines_min) { - PARA_WARNING_LOG("%s", "can not decrease top window"); + PARA_WARNING_LOG("can not decrease top window"); return; } init_wins(top.lines - 1); @@ -1265,7 +1265,7 @@ static void com_shrink_top_win(void) static void com_enlarge_top_win(void) { if (bot.lines < 3) { - PARA_WARNING_LOG("%s", "can not increase top window"); + PARA_WARNING_LOG("can not increase top window"); return; } init_wins(top.lines + 1); @@ -1280,7 +1280,7 @@ static void com_version(void) CODENAME "\""); } -static void com_quit(void) +__noreturn static void com_quit(void) { finish(0); }