André Wöbbeking wrote: > Hi, > > I'm using Valgrind 3.4.1 and I wonder why I don't get a warning for the > std::swap() call in the attached example. I get one in printf(). Is this > a bug? > > > Cheers, > André > > ------------------------------------------------------------------------
André, Valgrind only reports when an unused variable is used for flow-control (or, hopefuly I/O). Swapping doesn't trigger the alert. This is because, in C, structures can legitimately have uninitialised areas due to nested unions or padding. printf() uses flow-control to decide how many characters to print. HTH, Colin S. Miller ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
