Description of problem: I just tried to compile Core2 Test1 package netpbm-10.19-2 The compiler complained of the use of nested functions. Here is a patch to shut up the compiler and to make the code more ISO C standard conformant. --- converter/ppm/ppmtoilbm.c.orig 2004-03-03 11:00:21.547452512 +0000 +++ converter/ppm/ppmtoilbm.c 2004-03-03 11:00:43.101175848 +0000 @@ -2400,16 +2400,6 @@ /************ compression ************/ - -/* runbyte1 algorithm by Robert A. Knop (rknop.edu) */ -static int -runbyte1(size) - int size; -{ - int in,out,count,hold; - register unsigned char *inbuf = coded_rowbuf; - register unsigned char *outbuf = compr_rowbuf; - static void * xmalloc2(x,y) int x; @@ -2426,6 +2416,16 @@ } +/* runbyte1 algorithm by Robert A. Knop (rknop.edu) */ +static int +runbyte1(size) + int size; +{ + int in,out,count,hold; + register unsigned char *inbuf = coded_rowbuf; + register unsigned char *outbuf = compr_rowbuf; + + in=out=0; while( in<size ) { if( (in<size-1) && (inbuf[in]==inbuf[in+1]) ) { The compiler also said 1. pbmtomda.c(179): remark #592: variable "nOutRows" is used before its value is set The source code is overflow_add(nOutRows, 3); Suggest init local variable nOutRows before first use. 2. winicontoppm.c(407): remark #592: variable "bitmap" is used before its value is set The source code is u1 * bitmap; /* remember - bmp (dib) stored upside down, so reverse */ u1 * bitcurptr = bitmap + (bytes * width * (height-1) ) * (sizeof (u1)); Suggest init local variable bitmap before first use. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
All fixed in netpbm-10.22-2 and later. Read ya, Phil