coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: baseN: new program suggestion (various 'base' encoding)


From: Bernhard Voelker
Subject: Re: baseN: new program suggestion (various 'base' encoding)
Date: Thu, 3 Jan 2019 17:22:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3

On 12/28/18 8:41 AM, Assaf Gordon wrote:
> pushed here:

I get these 2 new warnings here on openSUSE:Tumbleweed:

  $ make
  ...
  CC       src/basenc-basenc.o
  src/basenc.c: In function 'do_encode':
  src/basenc.c:980:8: error: argument to variable-length array may be too large 
due to \
    conversion from 'int' to 'long unsigned int' [-Werror=vla-larger-than=]
     char outbuf[BASE_LENGTH (ENC_BLOCKSIZE)];
          ^~~~~~
  src/basenc.c: In function 'do_decode':
  src/basenc.c:1018:8: error: argument to variable-length array may be too 
large due to \
    conversion from 'int' to 'long unsigned int' [-Werror=vla-larger-than=]
     char inbuf[BASE_LENGTH (DEC_BLOCKSIZE)];
          ^~~~~
  cc1: all warnings being treated as errors

  $ gcc --version | head -n1
  gcc (SUSE Linux) 8.2.1 20181108 [gcc-8-branch revision 265914]

Maybe the BASE??_LENGTH macros should do a cast?

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]