Hi, Am Donnerstag, 22. November 2012, 12:30:38 schrieb Martin Simmons: > >>>>> On Thu, 22 Nov 2012 10:22:39 +0100, Bastian Friedrich said: > > + bsnprintf(add, sizeof(add), "%lu", (uint32_t)getpid()); > > Using %lu for uint32_t is wrong on 64-bit systems. Why not cast to unsigned > long?
a) the respective statement does not result in any warnings or errors on my (64 bit linux) machine b) The code does just the same as line 632 in the same file, which says: bsnprintf(s + strlen(s), ss, "%lu", (uint32_t)getpid()); so if either is fixed, so should be the other one. c) pid_t is signed, so the "unsigned" is probably wrong in any case ... If one wants to modify the patch, probably the straight forward version will do: bsnprintf(add, sizeof(add), "%d", getpid()); I don't know any system where size of pid_t exceeds that of int ...? Bastian -- Collax GmbH . Basler Str. 115a . 79115 Freiburg . Germany p: +49 (0) 89-990 157-28 www.collax.com Geschäftsführer: Falk Birkner, Ralf Elias AG München HRB 173695. Ust.-IdNr: DE270819312 ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel