lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Difficulty building with "dll" attributes and new wx


From: Greg Chicares
Subject: Re: [lmi] Difficulty building with "dll" attributes and new wx
Date: Tue, 21 Jul 2020 15:05:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 2020-07-21 13:22, Vadim Zeitlin wrote:
[...]
>  After wasting literally 2 hours on trying to understand what was going on
> here, I've finally realized that it was just a matter of forgetting a
> single character in an innocuous change half a year ago. I've finally fixed
> this in
> 
> https://github.com/wxWidgets/wxWidgets/commit/b762d2fb0f5cb5333e77df1ab3be52f6ce752cce
Thanks--I would never have been able to find that in only two hours.

My first thought was "wouldn't shellcheck have flagged that?", but
apparently not:

$cat xyzzy.sh 
#!/bin/sh
if test "SHARED" = 1; then echo "This is not flagged"; fi
if [ "SHARED" = 1 ]; then echo "This, however, *is* flagged"; fi
/opt/lmi/src/lmi[0]$shellcheck xyzzy.sh              

In xyzzy.sh line 3:
if [ "SHARED" = 1 ]; then echo foo; fi
              ^-- SC2050: This expression is constant. Did you forget the $ on 
a variable?

IOW, shellcheck flags the '[ ' form, but not the 'test ' form.

But that's probably academic. My second and perhaps less academic
thought was "might shellcheck usefully flag something else in these
scripts?", and...well, it emits a lot of output, almost all of which
looks benign, but I wonder whether this one is unintended:

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

In /srv/cache_for_lmi/vcs/wxWidgets/configure line 3576:
  >$cache_file
  ^----------^ SC2188: This redirection doesn't have a command. Move to its 
command (or use 'true' as no-op).

And here are a couple that I can't dismiss due to my lack of knowledge,
selected because the diagnostics seem so confident:

In /srv/cache_for_lmi/vcs/wxWidgets/configure line 12749:
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
                  ^--------------------------^ SC2124: Assigning an array to a 
string! Assign as array, or use * instead of @ to concatenate.

In /srv/cache_for_lmi/vcs/wxWidgets/configure line 24:
  alias -g '${1+"$@"}'='"$@"'
           ^----------------^ SC2142: Aliases can't use positional parameters. 
Use a function.


reply via email to

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