From: Stephen D. <sd...@us...> - 2005-10-09 06:09:16
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29407/nsd Modified Files: rollfile.c tclimg.c Log Message: * nsd/rollfile.c (Ns_PurgeFiles): Quiet compiler complaints about an uninitialised variable, which was fine. Add missing error return statement. * nsd/tclimg.c (NsTclGifSizeObjCmd): Clarify signedness of character comparisons to quiten compiler. Index: rollfile.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/rollfile.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rollfile.c 8 Oct 2005 12:06:07 -0000 1.5 --- rollfile.c 9 Oct 2005 06:09:03 -0000 1.6 *************** *** 171,175 **** Ns_PurgeFiles(CONST char *file, int max) { ! File *files, *fiPtr; int ii, nfiles, status = NS_ERROR; --- 171,175 ---- Ns_PurgeFiles(CONST char *file, int max) { ! File *fiPtr, *files = NULL; int ii, nfiles, status = NS_ERROR; *************** *** 182,185 **** --- 182,186 ---- Ns_Log(Error, "rollfile: failed to match files '%s': %s", file, strerror(Tcl_GetErrno())); + return NS_ERROR; } Index: tclimg.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclimg.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tclimg.c 8 Oct 2005 12:06:07 -0000 1.4 --- tclimg.c 9 Oct 2005 06:09:03 -0000 1.5 *************** *** 69,74 **** Tcl_Obj *CONST objv[]) { ! unsigned char buf[0x300], count; ! char *file; int depth, colormap, dx, dy, status; Tcl_Channel chan; --- 69,74 ---- Tcl_Obj *CONST objv[]) { ! char buf[0x300], *file; ! unsigned char count; int depth, colormap, dx, dy, status; Tcl_Channel chan; *************** *** 101,106 **** } ! if (strncmp((char *) buf, "GIF87a", 6) && ! strncmp((char *) buf, "GIF89a", 6)) { badfile: Tcl_AppendResult(interp, "bad gif file \"", file, "\"", NULL); --- 101,106 ---- } ! if (strncmp(buf, "GIF87a", 6) && ! strncmp(buf, "GIF89a", 6)) { badfile: Tcl_AppendResult(interp, "bad gif file \"", file, "\"", NULL); *************** *** 112,120 **** } ! depth = 1 << ((buf[4] & 0x7) + 1); ! colormap = (buf[4] & 0x80 ? 1 : 0); if (colormap) { ! if (Tcl_Read(chan, buf, (size_t)(3*depth)) != (3*depth)) { goto readfail; } --- 112,120 ---- } ! depth = 1 << ((((unsigned char) buf[4]) & 0x7) + 1); ! colormap = (((unsigned char) buf[4]) & 0x80 ? 1 : 0); if (colormap) { ! if (Tcl_Read(chan, buf, (size_t) (3*depth)) != (3*depth)) { goto readfail; } *************** *** 149,154 **** } ! dx = 0x100 * buf[5] + buf[4]; ! dy = 0x100 * buf[7] + buf[6]; if (AppendObjDims(interp, dx, dy) != TCL_OK) { --- 149,154 ---- } ! dx = 0x100 * ((unsigned char) buf[5]) + ((unsigned char) buf[4]); ! dy = 0x100 * ((unsigned char) buf[7]) + ((unsigned char) buf[6]); if (AppendObjDims(interp, dx, dy) != TCL_OK) { |