On 03/02/11 10:13, Baurzhan Ismagulov wrote: > On Thu, Feb 03, 2011 at 09:13:56AM +0000, Tom Hughes wrote: >>>> In my function, I definitely initialize every value in the structure (both >>>> by clearing with memset and also individually), but I still get this >>>> message. >>> >>> Assuming that msgp is f_msg *, I fail to see mtext in f_msg. Is it the >>> right struct? >> >> No, he is passing that struct as mtext. >> >> The problem is that the struct has padding, which he won't be initialising. > > I assume he memsets the whole struct, so padding should also be initialized?
Why would you presume that? I would say that it's pretty clear that he isn't, or he wouldn't get the warning from valgrind! Tom -- Tom Hughes ([email protected]) http://compton.nu/ ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
