summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-01-31 10:21:48 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-01-31 12:07:39 -0800
commiteb3cd9e97bbfbfd127097168e8e5c3f207c9fc40 (patch)
tree4cbc1b9f37e5bf00508b4d83cea01fb9754101f6 /gl
parent604f8a6c4d58a646c8722fdf7cad9ee67479d8f7 (diff)
downloadcoreutils-eb3cd9e97bbfbfd127097168e8e5c3f207c9fc40.tar.gz
maint: pacify gcc -flto -Wmaybe-uninitialized
* gl/lib/xdectoint.c (__xnumtoint): Tell gcc that ‘error’ does not return here. * gl/modules/xdectoint (Depends-on): Add stdbool, verify.
Diffstat (limited to 'gl')
-rw-r--r--gl/lib/xdectoint.c3
-rw-r--r--gl/modules/xdectoint2
2 files changed, 5 insertions, 0 deletions
diff --git a/gl/lib/xdectoint.c b/gl/lib/xdectoint.c
index 67ec972a1..da53018c0 100644
--- a/gl/lib/xdectoint.c
+++ b/gl/lib/xdectoint.c
@@ -21,10 +21,12 @@
#include <errno.h>
#include <inttypes.h>
+#include <stdbool.h>
#include <stdlib.h>
#include "error.h"
#include "quote.h"
+#include "verify.h"
#include "xstrtol.h"
/* Parse numeric string N_STR of base BASE, and return the value.
@@ -68,6 +70,7 @@ __xnumtoint (char const *n_str, int base, __xdectoint_t min, __xdectoint_t max,
/* EINVAL error message is redundant in this context. */
error (err_exit ? err_exit : EXIT_FAILURE, errno == EINVAL ? 0 : errno,
"%s: %s", err, quote (n_str));
+ assume (false);
}
return tnum;
diff --git a/gl/modules/xdectoint b/gl/modules/xdectoint
index cbd372666..90a278c0b 100644
--- a/gl/modules/xdectoint
+++ b/gl/modules/xdectoint
@@ -11,6 +11,8 @@ Depends-on:
error
errno
quote
+stdbool
+verify
xstrtoimax
xstrtoumax