lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #6414] Avoid compiler errors/warnings with mem_size_


From: Jonathan Larmour
Subject: [lwip-devel] [patch #6414] Avoid compiler errors/warnings with mem_size_t if MEM_LIBC_MALLOC
Date: Fri, 08 Feb 2008 20:26:03 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12

URL:
  <http://savannah.nongnu.org/patch/?6414>

                 Summary: Avoid compiler errors/warnings with mem_size_t if
MEM_LIBC_MALLOC
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jifl
            Submitted on: Friday 02/08/2008 at 20:26
                Category: None
                Priority: 3 - Low
                  Status: Need Info
                 Privacy: Public
             Assigned to: jifl
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

As per the discussion "Possible mistake in mem.h" here:
http://lists.gnu.org/archive/html/lwip-devel/2008-01/threads.html

here is an untested patch.

Can someone (Iordan?) please verify it resolves the issue.

Note that I had to remove the MEM_SIZE_F format string, since I could not do
anything sane with it if mem_size_t is size_t. The size of size_t is unknown
for the purposes of determining the format specifier, and getting the wrong
size could screw up the stack on some architectures. I doubt the %z specifier
(the offical ISO C 99 way) is portable enough to rely on. We could a SIZE_T_F
requirement on ports, but that seems arduous given the only use is from a
debug statistics display function, so I've just cast to 32.

Kieran, please let me know if this is ok for check-in prior to 1.3.0 or not
(once tested).

Jifl




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Friday 02/08/2008 at 20:26  Name: mem.size_t.patch  Size: 4kB   By:
jifl

<http://savannah.nongnu.org/patch/download.php?file_id=14999>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6414>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]