1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-16 12:22:01 +02:00

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.
This commit is contained in:
Paul Eggert
2022-01-31 10:21:48 -08:00
parent 604f8a6c4d
commit eb3cd9e97b
2 changed files with 5 additions and 0 deletions

View File

@@ -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;

View File

@@ -11,6 +11,8 @@ Depends-on:
error
errno
quote
stdbool
verify
xstrtoimax
xstrtoumax