summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2010-04-18 14:11:38 -0700
committerAaron Plattner <aplattner@nvidia.com>2010-04-19 12:45:14 -0700
commit999d8e8d1e430c62b5237e885836830e5f8b8d73 (patch)
tree51b5e1403fb9f129e378e16cdf6df7548d00026e /include
parentf0e8a1c429ab91c01de8805358f752a0ffe535d5 (diff)
tet: Fix the remaining warnings.
Add a TET_NORETURN attribute and tag various fatal functions with it. That fixes a few "int x; switch(...) { case C: x = blah; break; default: fatal() }" cases that result in uninitialized variable warnings. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r--include/tet_api.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/tet_api.h b/include/tet_api.h
index b81e2990..1f70e287 100644
--- a/include/tet_api.h
+++ b/include/tet_api.h
@@ -240,6 +240,12 @@ extern "C" {
# define TET_PROTOLIST(list) ()
#endif
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
+# define TET_NORETURN __attribute__((noreturn))
+#else
+# define TET_NORETURN
+#endif /* GNUC */
+
/* NULL function pointer - may be used as an argument to tet_fork() */
#define TET_NULLFP ((void (*) ()) 0)
@@ -304,7 +310,7 @@ extern "C" {
/* functions in TETware-Lite and in Distrubuted TETware */
TET_IMPORT_FUNC(void, tet_delete, TET_PROTOLIST((int, char *)));
-TET_IMPORT_FUNC(void, tet_exit, TET_PROTOLIST((int)));
+TET_NORETURN TET_IMPORT_FUNC(void, tet_exit, TET_PROTOLIST((int)));
TET_IMPORT_FUNC(char *, tet_getvar, TET_PROTOLIST((char *)));
TET_IMPORT_FUNC(void, tet_infoline, TET_PROTOLIST((char *)));
TET_IMPORT_FUNC(int, tet_kill, TET_PROTOLIST((pid_t, int)));