]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: avoid -Wsometimes-uninitialized on macOS 12
authorBruno Haible <bruno@clisp.org>
Wed, 15 Mar 2023 13:15:11 +0000 (13:15 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 15 Mar 2023 13:15:11 +0000 (13:15 +0000)
* src/pr.c (integer_overflow): Mark as _Noreturn.
* src/test.c (beyond): Likewise.

src/pr.c
src/test.c

index 28a6952421369818df4379749a94a7f3b97d7cd1..2c5cdceb1179083802fe9f417f4e33c36adbf8cd 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -772,7 +772,7 @@ static struct option const long_options[] =
   {NULL, 0, NULL, 0}
 };
 
-static void
+static _Noreturn void
 integer_overflow (void)
 {
   die (EXIT_FAILURE, 0, _("integer overflow"));
index 103a72ad3a0d56786d94611695f473e2edc770e5..4e84849f0f0d74608fc33b750ab8fff3f14fb893 100644 (file)
@@ -119,7 +119,7 @@ unary_advance (void)
  * beyond - call when we're beyond the end of the argument list (an
  *     error condition)
  */
-static void
+static _Noreturn void
 beyond (void)
 {
   test_syntax_error (_("missing argument after %s"), quote (argv[argc - 1]));