You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "chrysn (via GitHub)" <gi...@apache.org> on 2024/12/30 22:47:43 UTC

[PR] debug: Declare as printf-style, remove empty statement [mynewt-nimble]

chrysn opened a new pull request, #1951:
URL: https://github.com/apache/mynewt-nimble/pull/1951

   This resolves the -Wformat-nonliteral warning by (which complains about non-literals used as printf formatters, unless the containing function itself is also printf style), and a stray leftover empty debug statement discovered by that warning: -Wformat-nonliteral is a bit of a false postive here because due to the level prefix, the empty printf is not *really* empty, but it is accurate enough in that it does not provide any valuable details.
   
   ---
   
   This was found when building the latest nimble with RIOT, which has relatively strict warnings on – and while those are often disabled for projects that don't usually build with the strict warnings, since the debug header gets included in public headers, it spreads to many compilation units. Applying the attribute(format) is also in line with RIOT's [code style](https://github.com/RIOT-OS/RIOT/blob/master/CODING_CONVENTIONS.md#-wformat-nonliteral), which while not directly applicable, is tangentially relevant as the header file is specifically part of the RIOT port.
   
   If there is actual information that should be shown in the removed DEBUG line, I'm happy to alter the patch to include it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] debug: Declare as printf-style, remove empty statement [mynewt-nimble]

Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc merged PR #1951:
URL: https://github.com/apache/mynewt-nimble/pull/1951


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org