arm-gnu-toolchain-12.2.mpacbti
Uwe Bonnes <bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org> Sun, 9 Apr 2023 16:02:39 +0200
| Newsgroups | gmane.comp.hardware.microcontrollers.ethernut |
|---|---|
| Message-ID | <[email protected]> |
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-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion