[sane-devel] unpaper default parameter - empty output bug

Frank Zago fzago@austin.rr.com
Fri, 11 Mar 2005 19:04:55 -0600

Hi Jens,

Jens Gulden wrote:
> Peter Fales schrieb:
>> Now that's wierd.   I was using a privately built copy of unpaper, but I
>> just unpacked the tarball and get the same results with the prebuilt 
>> binary!
> I just reproduced the problem on one remote Intel machine I have access to.
> Try to compile without any optimization (no -Ox), this was the only way 
> for me to get a usable executable for that machine. Does it help for 
> you? (I am using gcc 3.3.5 on Debian.)
> Jens

Compile unpaper with the -Wall options and fix all the warnings. It will show 
there's a few bug (uninitialized variables for instance).

   gcc -Wall -O1 -g3 unpaper.c -o unpaper -lm

Once it's done, run valgrind on it and fix the bugs it finds.

   valgrind --tool=memcheck unpaper tst.pgm tst2.pgm