From d3126e597175c6552e3cec8e7e0c10a57525ba0a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 31 Jan 2022 10:21:48 -0800 Subject: [PATCH 43/43] maint: pacify gcc -flto -Wmaybe-uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gl/lib/xdectoint.c (__xnumtoint): Tell gcc that ‘error’ does not return here. * gl/modules/xdectoint (Depends-on): Add stdbool, verify. --- gl/lib/xdectoint.c | 3 +++ gl/modules/xdectoint | 2 ++ 2 files changed, 5 insertions(+) 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 #include +#include #include #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 -- 2.32.0