Mail Archives: djgpp-workers/2000/06/13/18:32:48
A side effect of symlink development -
This patch fixes warning in script_exec()
where signed int i is used in
for (i=0; i < sizeof(line)-1 && line[i] != '\0'; i++)
if (line[i] < 7 && line[i] >= 0)
return direct_exec(program, argv, envp);
i is compared with sizeof(line) which is unsigned.
OK to commit?
Laurynas
Index: src/libc/dos/process/dosexec.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/dos/process/dosexec.c,v
retrieving revision 1.6
diff -u -r1.6 dosexec.c
--- dosexec.c 2000/05/31 17:53:46 1.6
+++ dosexec.c 2000/06/13 22:28:37
@@ -813,7 +813,8 @@
char line[130], interp[FILENAME_MAX], iargs[130];
FILE *f;
char **newargs;
- int i, hasargs=0;
+ int hasargs=0;
+ unsigned int i;
char *base, *p;
int has_extension = 0, has_drive = 0;
char pinterp[FILENAME_MAX];
- Raw text -