patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9478, MQTT.c printf warning in debug...

 
 

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

patch #9478: MQTT.c printf warning in debug messages

Submitter:  David Bourgeois <jaguarondi>
Submitted:  Fri 03 Nov 2017 10:20:03 PM UTC
   
 
Category:  apps Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Sun 05 Nov 2017 09:29:06 AM UTC, comment #2: 

Fixed in a more portable way, lwIP has an abstraction for format strings. Thanks for reporting!

Dirk Ziegelmeier <dziegel>
Group administrator
Fri 03 Nov 2017 10:23:39 PM UTC, comment #1: 

The warnings were:

format '%d' expects argument of type 'int', but argument 2 has type 'u32_t {aka long unsigned int}' [-Wformat=]        mqtt.c        /RCP1-stm32/Middlewares/LwIP        line 834        C/C++ Problem
format '%d' expects argument of type 'int', but argument 2 has type 'u32_t {aka long unsigned int}' [-Wformat=]        mqtt.c        /RCP1-stm32/Middlewares/LwIP        line 866        C/C++ Problem
format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]        mqtt.c        /RCP1-stm32/Middlewares/LwIP        line 741        C/C++ Problem
format '%d' expects argument of type 'int', but argument 4 has type 'u32_t {aka long unsigned int}' [-Wformat=]        mqtt.c        /RCP1-stm32/Middlewares/LwIP        line 866        C/C++ Problem


David Bourgeois <jaguarondi>
Fri 03 Nov 2017 10:20:03 PM UTC, original submission:  

I got the following warnings when compiling mqtt.c from HEAD with SW4STM32 (GCC) (I'm really on HEAD this time, sorry for last time)

I fixed these with the following patch. It uses C99 though.

David Bourgeois <jaguarondi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #42325:  mqtt_c.patch added by jaguarondi (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-05 dziegel StatusNone Done
        Open/ClosedOpen Closed
    2017-11-03 jaguarondi Attached File- Added mqtt_c.patch, #42325

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code