remove all but these __CRAZY=Yes build warnings:
main.c: In function 'main': main.c:208: warning: cast discards qualifiers from pointer target type main.c:329: warning: cast discards qualifiers from pointer target type no warnings at autoconf time left either; will take care of these two later (might revisit changes from this commit), maybe change declararion for the builtins to have their argv[] be const strings, and go through strict type and qualifier checking again. this'll further improve stability. XXX these changes might have introduced (more?) memory leaks, XXX someone who knows about these tools should verify with XXX automatic memory usage analysers (valgrind?) still passes testsuite
This commit is contained in:
10
tree.c
10
tree.c
@ -2,7 +2,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.6 2006/11/10 00:09:27 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.7 2006/11/12 14:58:16 tg Exp $");
|
||||
|
||||
#define INDENT 4
|
||||
|
||||
@ -477,7 +477,7 @@ wdcopy(const char *wp, Area *ap)
|
||||
}
|
||||
|
||||
/* return the position of prefix c in wp plus 1 */
|
||||
char *
|
||||
const char *
|
||||
wdscan(const char *wp, int c)
|
||||
{
|
||||
int nest = 0;
|
||||
@ -485,7 +485,7 @@ wdscan(const char *wp, int c)
|
||||
while (1)
|
||||
switch (*wp++) {
|
||||
case EOS:
|
||||
return (char *) wp;
|
||||
return (wp);
|
||||
case CHAR:
|
||||
case QCHAR:
|
||||
wp++;
|
||||
@ -506,7 +506,7 @@ wdscan(const char *wp, int c)
|
||||
case CSUBST:
|
||||
wp++;
|
||||
if (c == CSUBST && nest == 0)
|
||||
return (char *) wp;
|
||||
return (wp);
|
||||
nest--;
|
||||
break;
|
||||
case OPAT:
|
||||
@ -516,7 +516,7 @@ wdscan(const char *wp, int c)
|
||||
case SPAT:
|
||||
case CPAT:
|
||||
if (c == wp[-1] && nest == 0)
|
||||
return (char *) wp;
|
||||
return (wp);
|
||||
if (wp[-1] == CPAT)
|
||||
nest--;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user