[hardening-discuss] -Wformat and user-defined struct members called printf

Marcus Better marcus at better.se
Fri Jun 20 04:22:27 UTC 2008


Hi,

I'm preparing a package for the upcoming version of ser, the SIP Express
Router, and ran into trouble with -Wformat. The source defines a struct
rpc_t containing a function pointer named "printf":

typedef struct rpc {
/* ... */
    rpc_printf_f printf;
/* ... */
} rpc_t;

This causes compilation errors:

  ratelimit.c:348: error: ‘rpc_t’ has no member named ‘__printf_chk’

Is there a workaround for this, short of renaming the function?

Cheers,

Marcus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/hardening-discuss/attachments/20080620/a01cf026/attachment.pgp 


More information about the hardening-discuss mailing list