buglwIP - A Lightweight TCP/IP stack - Bugs: bug #61106, compiling newest source fails with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61106: compiling newest source fails with "-O3" optims

Submitted by:  Florian La Roche <flaroche>
Submitted on:  Thu 02 Sep 2021 12:20:36 PM UTC  
 
Category:  apps Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned Release:  2.2.0
lwIP version:  git head

Fri 12 Nov 2021 09:58:17 PM UTC, comment #4: 

I've updated tinydir.h to the newest version. If the problem persists, please report this to the tinydir developers (or continue writing here).

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 13 Sep 2021 09:49:17 AM UTC, comment #3: 

Haha, I totally lost the fact that tinydir.h is a copy in our repository. I'll look into it.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 13 Sep 2021 09:31:02 AM UTC, comment #2: 

I only came up with this other ugly patch to change strcat into
a strcpy for this one place and only for gcc.
(I'll upload this as lwip-gcc.patch here.)

I've only tested gcc-9 and gcc-10 to throw a warning, no test with
gcc-11 or other versions on this.

Not sure if you want to include this change into official sources,
I will just add this to local changes to keep going.

best regards,

Florian La Roche

Florian La Roche <flaroche>
Wed 08 Sep 2021 05:34:46 PM UTC, comment #1: 

This is a warning in tinydir.h, isn't it? I'm not sure what we could do about that other than reducing warnings.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 02 Sep 2021 12:20:36 PM UTC, original submission:  

Compiling the newest source with "-O3" optims (versus "-Og")
with gcc 10.2.1 (from Debian testing) fails with the following
lines:

cd /home/flaroche/data/leightweightip/lwip/build/contrib/ports/unix/example_app && /usr/bin/cc  -I/home/flaroche/data/leightweightip/lwip/src/include -I/home/flaroche/data/leightweightip/lwip/contrib -I/home/flaroche/data/leightweightip/lwip/contrib/ports/unix/port/include -I/home/flaroche/data/leightweightip/lwip/contrib/examples/example_app -g -O3 -Wall -pedantic -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wnested-externs -Wunreachable-code -Wuninitialized -Waggregate-return -Wlogical-not-parentheses -Wredundant-decls -Wc++-compat -Wlogical-op -Wtrampolines -Wc90-c99-compat -o CMakeFiles/makefsdata.dir/__/__/__/__/src/apps/http/makefsdata/makefsdata.c.o -c /home/flaroche/data/leightweightip/lwip/src/apps/http/makefsdata/makefsdata.c
In file included from /home/flaroche/data/leightweightip/lwip/src/apps/http/makefsdata/makefsdata.c:20:
In function ‘tinydir_readfile’,
    inlined from ‘tinydir_open_sorted.constprop’ at /home/flaroche/data/leightweightip/lwip/src/apps/http/makefsdata/tinydir.h:377:7:
/home/flaroche/data/leightweightip/lwip/src/apps/http/makefsdata/tinydir.h:81:25: warning: ‘strcat’ accessing 4097 or more bytes at offsets [-4611686018427387904, 4611686018427387903] and [-4611686018427383808, 4611686018427391999] may overlap 1 byte at offset [-4611686018427383808, 9223372036854775807] [-Wrestrict]
   81 | #define _tinydir_strcat strcat
      |                         ^
/home/flaroche/data/leightweightip/lwip/src/apps/http/makefsdata/tinydir.h:536:2: note: in expansion of macro ‘_tinydir_strcat’
  536 |  _tinydir_strcat(file->path, file->name);
      |  ^~~~~~~~~~~~~~~

Florian La Roche <flaroche>

 

Attached Files
file #51902:  lwip-gcc.patch added by flaroche (573B - text/x-patch - Remove gcc warning for _GNUC_ only.)
file #51862:  lwip.patch added by flaroche (1013B - text/x-patch - How to swith to -O3 optims)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by flaroche (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-12 goldsimon StatusNone => Fixed
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 2.2.0
    2021-09-13 flaroche Attached File- => Added lwip-gcc.patch, #51902
    2021-09-02 flaroche Attached File- => Added lwip.patch, #51862

    Back to the top


    Powered by Savane 3.7