[LEDE-DEV] [PATCH] libubox: Add printf attribute to several functions.
Felix Fietkau
nbd at nbd.name
Tue Nov 1 05:35:28 PDT 2016
On 2016-11-01 08:32, Rosen Penev wrote:
> Also fixed some formats. Without this attribute, GCC does not see the several functions as variants of the -f family of functions which prevents it from warning about their usage. Might help with optimization too. I avoided defining the attributes in utils.h since different functions have different requirements.
>
> Signed-off by: Rosen Penev <rosenp at gmail.com>
I think putting these annotations in the .c files does not make any
sense, since external code calling these functions will not see it.
Also, it's probably a good idea to define __printf() and make it no-op
in case GCC is not used.
Another thing: Please don't fix different unrelated things in the same
patch, send multiple patches instead.
- Felix
More information about the Lede-dev
mailing list