Brace expansion fail compilation

2017-04-26 Thread Florian Mayer
$ echo $BASH_VERSION 4.4.12(1)-release $ echo $BASH_VERSION{nobraceexpansion} 4.4.12(1)-release{nobraceexpansion} $ echo ${BASH_VERSION}{brace,expansion} 4.4.12(1)-releasebrace 4.4.12(1)-releaseexpansion $ echo $BASH_VERSION{brace,expansion} => no output. Unexpected $ echo $BASH_VERSIONfoo => no ou

Re: Brace expansion fail compilation

2017-04-26 Thread Pierre Gaston
On Wed, Apr 26, 2017 at 1:13 PM, Florian Mayer wrote: > $ echo $BASH_VERSION > 4.4.12(1)-release > $ echo $BASH_VERSION{nobraceexpansion} > 4.4.12(1)-release{nobraceexpansion} > $ echo ${BASH_VERSION}{brace,expansion} > 4.4.12(1)-releasebrace 4.4.12(1)-releaseexpansion > $ echo $BASH_VERSION{brac

Re: Brace expansion fail compilation

2017-04-26 Thread Florian Mayer
wow..., ok thanks for the quick reply > On 26 Apr 2017, at 12:17, Pierre Gaston wrote: > > > >> On Wed, Apr 26, 2017 at 1:13 PM, Florian Mayer wrote: >> $ echo $BASH_VERSION >> 4.4.12(1)-release >> $ echo $BASH_VERSION{nobraceexpansion} >> 4.4.12(1)-release{nobraceexpansion} >> $ echo ${BASH_

Re: Brace expansion fail compilation

2017-04-26 Thread Chet Ramey
On 4/26/17 6:13 AM, Florian Mayer wrote: > - Expansion will be performed like it should be the case, because „{„ is > obviously a parameter expansion terminal character as the line > $ echo $BASH_VERSION{nobraceexpansion} > shows, because this line really does expand $BASH_VERSION This is not a

Re: Using Clang's static analyzer on bash

2017-04-26 Thread Eduardo Bustamante
On Mon, Apr 24, 2017 at 10:13 AM, Chet Ramey wrote: [...] > I'd be interested in seeing the results. In my experience with similar > tools, the false positive ratio is very high. Most of the "errors" identified are due to unused variables. It does have some interesting reports though: #1 optimi

Re: Using Clang's static analyzer on bash

2017-04-26 Thread Eduardo Bustamante
On Wed, Apr 26, 2017 at 10:10 AM, Eduardo Bustamante wrote: [...] > #1 optimized_assignment in variables.c does not check if xrealloc was > successful (i.e. not NULL), so if it fails, strcpy will end up > dereferencing a null pointer. I just noticed that xrealloc will exit on failure, so this is

Re: Using Clang's static analyzer on bash

2017-04-26 Thread Chet Ramey
On 4/26/17 11:10 AM, Eduardo Bustamante wrote: > On Mon, Apr 24, 2017 at 10:13 AM, Chet Ramey wrote: > [...] >> I'd be interested in seeing the results. In my experience with similar >> tools, the false positive ratio is very high. > > Most of the "errors" identified are due to unused variables.