Can someone explain this code?
int
pg_fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
const char *password, char *PQerrormsg)
{
#ifndef KRB5
(void) hostname; /* not used */
#endif
...
(fe-auth.c)
What does that code actually *do*?
//Magnus
* Magnus Hagander (magnus@hagander.net) wrote:
#ifndef KRB5
(void) hostname; /* not used */
#endif
[...]
What does that code actually *do*?
Stop the compiler from complaining about an unused argument.
Thanks,
Stephen
On 7/19/07, Magnus Hagander <magnus@hagander.net> wrote:
int
pg_fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
const char *password, char *PQerrormsg)
{
#ifndef KRB5
(void) hostname; /* not used */
#endif...
(fe-auth.c)
What does that code actually *do*?
Somebody tried to work around "unused argument" warning?
--
marko
On Thu, Jul 19, 2007 at 06:41:17AM -0400, Stephen Frost wrote:
* Magnus Hagander (magnus@hagander.net) wrote:
#ifndef KRB5
(void) hostname; /* not used */
#endif[...]
What does that code actually *do*?
Stop the compiler from complaining about an unused argument.
That makes sense, except my compiled didn't warn even when I took it out
:-) Ah, well, thanks for clearifying.
//Magnus
* Magnus Hagander (magnus@hagander.net) wrote:
On Thu, Jul 19, 2007 at 06:41:17AM -0400, Stephen Frost wrote:
Stop the compiler from complaining about an unused argument.
That makes sense, except my compiled didn't warn even when I took it out
:-) Ah, well, thanks for clearifying.
It depends on the compiler you're using.. My recollection is that
it shows up at least w/ gcc and -Wall and/or -pedantic.
Thanks,
Stephen