buglwIP - A Lightweight TCP/IP stack - Bugs: bug #53952, ip4_addr_debug_print_val unaligned...

 
 

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

bug #53952: ip4_addr_debug_print_val unaligned structure reference compiler warning

Submitted by:  Ray Ozzie <rozzie>
Submitted on:  Sun 20 May 2018 08:06:13 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.0.3

Thu 24 May 2018 09:14:23 PM UTC, comment #2: 

Should be fixed, could you test it? Me too lazy to set up IAR again... :-)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 22 May 2018 08:06:43 PM UTC, comment #1: 

Thanks. I'm using IAR, too, from time to time. However, this only should be a problem when debugging is acive. Still, I'll try to see if I can find a solution. That might involve trial and error jus for IAR, but so be it...

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 20 May 2018 08:06:13 PM UTC, original submission:  

I've been using completely unmodified 2.0.3 without any issues for months; thank you for your time and efforts.

In the past I've been using the GCC compilers embedded within Rowley CrossStudio, and LwIP has compiled without any warnings.

I am now converting my project to the latest version of IAR Embedded Workbench for ARM Version (8.22.1.15700), which has a non-GCC compiler.

LwIP again compiles cleanly except for a single file, which emits warnings about the unaligned references while trying to decompose the components of an IPv4 address - see below.

I started trying to decompose the macros to see if I could understand the source of the issue [obviously the references are unaligned, even if safely so], but couldn't readily determine the problem.

It may be harmless in the generated code, but assuming that you do want to resolve this to maintain a clean compile, here's the info. 

Happy to help if you want to test a potential fix.

icmp.c

   IAR ANSI C/C++ Compiler V8.22.1.15669/W32 for ARM
   Copyright 1999-2018 IAR Systems AB.
Cortex-M edition 8.22
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(358) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(358) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(358) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(358) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(360) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(360) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(360) : Warning[Pa039]: use of address of unaligned structure member
C:\Users\ray\dev\notebox\nbc\rtos\lwip\src\core\ipv4\icmp.c(360) : Warning[Pa039]: use of address of unaligned structure member

 408 bytes of CODE memory

Errors: none
Warnings: 8

Ray Ozzie <rozzie>

 

No files currently attached

 

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 rozzie (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-24 goldsimon StatusNone => Fixed
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5