[En-Nut-Discussion] arm-gnu-toolchain-12.2.mpacbti
    Uwe Bonnes 
    bon at elektron.ikp.physik.tu-darmstadt.de
       
    Sun Apr  9 16:02:39 CEST 2023
    
    
  
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 ---------
    
    
More information about the En-Nut-Discussion
mailing list