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

Submitted by:  David Bourgeois <jaguarondi>
Submitted on:  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>
Project 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>

 

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)
  •  

    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
    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.5