[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] bc: Add 'U' suffix in UINT_MAX preprocessor check
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2019-09-12 10:24:44
Message-ID: CAK1hOcPWsO9tVNWmZcXyLehYa156QSvb8brYZ1wQoOEdLKmCHw () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks

On Thu, Sep 5, 2019 at 5:40 PM Kang-Che Sung <explorer09@gmail.com> wrote:
>
> Without the 'U' unsigned suffix, gcc will throw a "integer constant is
> so large that it is unsigned" warning.
> ---
>  miscutils/bc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/miscutils/bc.c b/miscutils/bc.c
> index e492f0f50..92721d18f 100644
> --- a/miscutils/bc.c
> +++ b/miscutils/bc.c
> @@ -844,10 +844,10 @@ struct globals {
>  # error Strange INT_MAX
>  #endif
>
> -#if UINT_MAX == 4294967295
> +#if UINT_MAX == 4294967295U
>  # define BC_MAX_SCALE_STR  "4294967295"
>  # define BC_MAX_STRING_STR "4294967294"
> -#elif UINT_MAX == 18446744073709551615
> +#elif UINT_MAX == 18446744073709551615U
>  # define BC_MAX_SCALE_STR  "18446744073709551615"
>  # define BC_MAX_STRING_STR "18446744073709551614"
>  #else
> --
> 2.18.0
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic