On Sun, Oct 02, 2005 at 09:17:22PM +0100, Mark Brown wrote: > On Sat, Oct 01, 2005 at 02:59:04PM -0400, Justin Pryzby wrote: > > > I want to write a compressed file only if the given extension is > > ".gz", so I do the appropriate string comparison. gzopen(fn, "wb") > > works, writing a compressed file as expected, but gzopen(fn, "wb0") > > gives many valgrind errors about "Conditional jump or move depends on > > uninitialised value(s)". Maybe this is not the correct way to write > > The valgrind warnings with compression enabled all appear to be expected > ones due to loop unrolling in longest_match. The warnings from running > with compression disabled appear to be similar warnings in a different > place with a similar comment explaining that the results of the > operation will be discarded. ==4260== More than 30000 total errors detected. I'm not reporting any more. ==4260== Final error counts will be inaccurate. Go fix your program! ==4260== Rerun with --error-limit=no to disable this cutoff. Note ==4260== that errors may occur in your program without prior warning from ==4260== Valgrind, because errors are no longer being displayed.
Is that really expected? Thats with "wb0". > > Otherwise this bug is that "wb0" fails. > > What makes you say this? As far as I am able to tell your test program > runs to completion without error, writing out a gzip format file which > appears to have the required contents. The only problem you have > mentioned is the warnings from valgrind. Hmm. Now I can't remember what I meant. But it looks like the file is compressed anyway: /tmp/gztestfile: gzip compressed data, from Unix (compiled with "wb0"). Is "not compressed" supposed to include a gzip header, or is it supposed to pass the data unchanged to fwrite()? I suspect that that's what I meant. Justin (whos emails appear to be working now) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]