[Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9)

Norbert Sendetzky norbert at linuxnetworks.de
Mon Jun 23 22:21:54 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> On Mon, 23 Jun 2003 00:00:04 +0200, bert hubert wrote:
>> On Sun, Jun 22, 2003 at 11:11:30PM +0200, Christof Meerwald wrote:
>>> pdns/pdns_recursor.cc (line 47)
>>>   pthread_t pthread_self(void){pthread_t tmp; return tmp;}
>>> 
>>> returning an uninitialized local variable is a very bad idea (and results 
> in
>>> empty lines being written to syslog).
>> This function is never called - it is only a bogus function to satisfy an
>> unused dependency. If it is ever called, it is a problem.
>
> At least pdns/logger.cc calls pthread_self (and pdns_recursor.cc uses the
> Logger).

Well, Logger will call the real pthread_self() function and not the dummy (I 
hope).

To remove the warning, simply change the line to:
pthread_t pthread_self(void){return (pthread_t) 0;}


Norbert

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+91NaxMLs5v5/7eARAnVDAJ9y+t4FO5Aukcw80JoLS972/b2CpgCfdDiV
m1uUSi46Ti8gkRoQTtunZWc=
=Jtw1
-----END PGP SIGNATURE-----



More information about the Pdns-dev mailing list