From c5fcdd9a58a2508a20327226c52d155c29ddd5f3 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 17 Aug 2020 09:33:54 +0200 Subject: Fix a current gcc's -fsanitize warning. * src/argparse.c (ARGPARSE_FLAG__INITIALIZED): Make sure it is an unsigned int. -- GnuPG-bug-id: 5026 --- src/argparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/argparse.c b/src/argparse.c index 88e75c2..ca2b951 100644 --- a/src/argparse.c +++ b/src/argparse.c @@ -56,7 +56,7 @@ static struct /* Hidden argparse flag used to mark the object as initialized. */ -#define ARGPARSE_FLAG__INITIALIZED (1<< ((8*SIZEOF_INT)-1)) +#define ARGPARSE_FLAG__INITIALIZED (1u << ((8*SIZEOF_INT)-1)) /* Special short options which are auto-inserterd. Must fit into an * unsigned short. */ @@ -2253,7 +2253,7 @@ set_opt_arg (gpgrt_argparse_t *arg, unsigned flags, char *s) /* Return the length of the option O. This needs to consider the - * description as weel as the option name. */ + * description as well as the option name. */ static size_t long_opt_strlen (opttable_t *o) { -- cgit v1.2.3