Marcus Meissner : widl: Mark non-returning functions as noreturn.
Alexandre Julliard
julliard at winehq.org
Wed May 7 07:03:58 CDT 2008
Module: wine
Branch: master
Commit: 1ff216c874a6ef96fa3b9ab0affdb68176b214bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1ff216c874a6ef96fa3b9ab0affdb68176b214bb
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Tue May 6 20:43:58 2008 +0200
widl: Mark non-returning functions as noreturn.
---
tools/widl/utils.c | 3 +--
tools/widl/utils.h | 8 ++++----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/widl/utils.c b/tools/widl/utils.c
index 9c4452f..1730e41 100644
--- a/tools/widl/utils.c
+++ b/tools/widl/utils.c
@@ -67,7 +67,7 @@ static void generic_msg(const loc_info_t *loc_info, const char *s, const char *t
/* yyerror: yacc assumes this is not newline terminated. */
-int parser_error(const char *s, ...)
+void parser_error(const char *s, ...)
{
loc_info_t cur_location = CURRENT_LOCATION;
va_list ap;
@@ -76,7 +76,6 @@ int parser_error(const char *s, ...)
fprintf(stderr, "\n");
va_end(ap);
exit(1);
- return 1;
}
void error_loc(const char *s, ...)
diff --git a/tools/widl/utils.h b/tools/widl/utils.h
index 73adf54..761d3b4 100644
--- a/tools/widl/utils.h
+++ b/tools/widl/utils.h
@@ -33,11 +33,11 @@ char *xstrdup(const char *str);
#define __attribute__(X)
#endif
-int parser_error(const char *s, ...) __attribute__((format (printf, 1, 2)));
+void parser_error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
int parser_warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
-void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2)));
-void error(const char *s, ...) __attribute__((format (printf, 1, 2)));
-void error_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3)));
+void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
+void error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
+void error_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))) __attribute__((noreturn));
void warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
void warning_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3)));
void chat(const char *s, ...) __attribute__((format (printf, 1, 2)));
More information about the wine-cvs
mailing list