[En-Nut-Discussion] arm-gnu-toolchain-12.2.mpacbti

Thiago A. Corrêa thiago.correa at gmail.com
Mon Apr 10 14:51:12 CEST 2023


Hi Uwe,

     Upstream has removed the getstr part, according to the commit that
removed it, it wasn't necessary at all.

https://github.com/lua/lua/commit/1ceec7437090bea4be7202b7f86e9d566e79f87f



On Sun, Apr 9, 2023 at 11:03 AM Uwe Bonnes <
bon at elektron.ikp.physik.tu-darmstadt.de> wrote:

> Hello,
>
> compiling for a STM32 target with arm-gnu-toolchain-12.2.mpacbti gives
> In function 'DumpString':
> ./ethernut/nut/lua/ldump.c:65:26: error: the comparison will always
> evaluate as 'false' for the pointer operand in 's + 16' must not be NULL
> [-Werror=address]
>    65 |  if (s==NULL || getstr(s)==NULL)
>       |                          ^~
>
> If no objection arrive, I will check in
>
>  static void DumpString(const TString* s, DumpState* D)
>  {
> - if (s==NULL || getstr(s)==NULL)
> + if (s==NULL || !(*getstr(s)))
>   {
>    size_t size=0;
>    DumpVar(size,D);
>
> Feedback welcome!
> --
> Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de
>
> Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
> --------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>


More information about the En-Nut-Discussion mailing list