|
From: Tom L. <tg...@ss...> - 2013-04-18 22:58:32
|
mar...@mh... writes: > thanks for your explanation. I've checked the sources, and > interestingly src/dbi_main.c contains a declaration of dbi_conn_queryf(): > dbi_result dbi_conn_queryf(dbi_conn Conn, const char *formatstr, ...) __attribute__ ((format (printf, 2, 3))); > in addition to the declaration in include/dbi/dbi.h: > dbi_result dbi_conn_queryf(dbi_conn Conn, const char *formatstr, ...); > Was that a half-assed attempt to implement what the OP asked for? > Would it be sufficient to move the first declaration to the header > which is visible to the programs that actually call the function? Right. The __attribute__() decoration needs to be visible to the call sites, so generally one sticks it in the header that provides the function's extern declaration. There's no point in attaching it to the function definition. regards, tom lane |