From: William K. V. <wk...@us...> - 2006-09-13 20:50:19
|
Hi, Sorry, I should have said something earlier. The system calls of "read" or "write" returning zero is not an error (they return "-1", which necessitated the ssize_t type), so the comparisons should have been ">= 0". In practice it rarely happens unless you are doing network programming, during network congestion you will frequently get a "0" return. I didn't supply a patch however if you'd like I can. HTH, William. On Wed, 2006-09-13 at 13:39, Bob Doan wrote: > Actually you can't subtract size in that routine like that because it > will cause stuff below to fail and no images will make it to the report. > > Attached is my version of it (committed) > On Sun, 2006-09-10 at 11:06 +0200, Zoltan Boszormenyi wrote: > > the stricter compiler and function attributes > > on Fedora Core 6 Test3 gave me warnings > > in rpdf, which turn out to be real bugs: > > ignored value returned by read() and write() > > can cause incomplete picture file read-in in > > rpdf/rpdf.c or incomplete PDF writeout > > rpdf/test.c. Also, a static function rpdf_error() > > isn't used anywhere, I made it inaccessible > > to the preprocessor with #if 0 for now. > > |