]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add noreturn to functions that don't return
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Sun, 16 Sep 2018 16:40:15 +0000 (18:40 +0200)
committerAnders F Björklund <anders.f.bjorklund@gmail.com>
Sun, 16 Sep 2018 16:41:10 +0000 (18:41 +0200)
Fix the extra semicolon and unreachable code

src/ccache.c
src/ccache.h
src/util.c

index 592158bca1a88785f8f5cdcc20739e0a8a021950..e5c606384cd34b6f0660b78e16aa67636a212beb 100644 (file)
@@ -40,6 +40,9 @@ extern char *current_working_dir;
 extern char *stats_file;
 extern unsigned lock_staleness_limit;
 
+static void failed(void) ATTR_NORETURN;
+static void ccache(int argc, char *argv[]) ATTR_NORETURN;
+
 int ccache_main(int argc, char *argv[]);
 
 static const char VERSION_TEXT[] =
@@ -3624,5 +3627,4 @@ ccache_main(int argc, char *argv[])
        free(program_name);
 
        ccache(argc, argv);
-       return 1;
 }
index 973d42dd3c7af9cda1fb245117f9533430e738d2..4779619e578b55e8ff7dbeef631bd8c1cc98aefe 100644 (file)
@@ -8,7 +8,7 @@
 
 #ifdef __GNUC__
 #define ATTR_FORMAT(x, y, z) __attribute__((format (x, y, z)))
-#define ATTR_NORETURN __attribute__((noreturn));
+#define ATTR_NORETURN __attribute__((noreturn))
 #else
 #define ATTR_FORMAT(x, y, z)
 #define ATTR_NORETURN
index 7efbea4b6ba61f9bdcc8c635c3656b695de424fe..52d16251305650b2e2d0d895327c8ea9b2db41cd 100644 (file)
@@ -99,6 +99,8 @@ path_max(const char *path)
 #endif
 }
 
+static void warn_log_fail(void) ATTR_NORETURN;
+
 // Warn about failure writing to the log file and then exit.
 static void
 warn_log_fail(void)