=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/varmodifiers.c,v retrieving revision 1.39 retrieving revision 1.40 diff -c -r1.39 -r1.40 *** src/usr.bin/make/varmodifiers.c 2014/09/21 13:43:25 1.39 --- src/usr.bin/make/varmodifiers.c 2015/01/23 13:18:40 1.40 *************** *** 1,4 **** ! /* $OpenBSD: varmodifiers.c,v 1.39 2014/09/21 13:43:25 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: varmodifiers.c,v 1.40 2015/01/23 13:18:40 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* *************** *** 391,397 **** static bool VarUniq(struct Name *word, bool addSpace, Buffer buf, void *lastp) { ! struct Name *last = (struct Name *)lastp; /* does not match */ if (last->s == NULL || last->e - last->s != word->e - word->s || --- 391,397 ---- static bool VarUniq(struct Name *word, bool addSpace, Buffer buf, void *lastp) { ! struct Name *last = lastp; /* does not match */ if (last->s == NULL || last->e - last->s != word->e - word->s || *************** *** 409,415 **** static bool VarLoop(struct Name *word, bool addSpace, Buffer buf, void *vp) { ! struct LoopStuff *v = (struct LoopStuff *)vp; if (addSpace) Buf_AddSpace(buf); --- 409,415 ---- static bool VarLoop(struct Name *word, bool addSpace, Buffer buf, void *vp) { ! struct LoopStuff *v = vp; if (addSpace) Buf_AddSpace(buf); *************** *** 420,426 **** static char * finish_loop(const char *s, const struct Name *n UNUSED , void *p) { ! struct LoopStuff *l = (struct LoopStuff *)p; return Var_Subst(s, NULL, l->err); } --- 420,426 ---- static char * finish_loop(const char *s, const struct Name *n UNUSED , void *p) { ! struct LoopStuff *l = p; return Var_Subst(s, NULL, l->err); } *************** *** 514,520 **** static char * do_def(const char *s, const struct Name *n UNUSED, void *arg) { ! VarPattern *v = (VarPattern *)arg; if (s == NULL) { free_patternarg(v); return NULL; --- 514,520 ---- static char * do_def(const char *s, const struct Name *n UNUSED, void *arg) { ! VarPattern *v = arg; if (s == NULL) { free_patternarg(v); return NULL; *************** *** 525,531 **** static char * do_undef(const char *s, const struct Name *n UNUSED, void *arg) { ! VarPattern *v = (VarPattern *)arg; if (s != NULL) { free_patternarg(v); return NULL; --- 525,531 ---- static char * do_undef(const char *s, const struct Name *n UNUSED, void *arg) { ! VarPattern *v = arg; if (s != NULL) { free_patternarg(v); return NULL; *************** *** 536,542 **** static char * do_assign(const char *s, const struct Name *n, void *arg) { ! VarPattern *v = (VarPattern *)arg; char *msg; char *result; --- 536,542 ---- static char * do_assign(const char *s, const struct Name *n, void *arg) { ! VarPattern *v = arg; char *msg; char *result; *************** *** 570,576 **** static char * do_exec(const char *s UNUSED, const struct Name *n UNUSED, void *arg) { ! VarPattern *v = (VarPattern *)arg; char *msg; char *result; --- 570,576 ---- static char * do_exec(const char *s UNUSED, const struct Name *n UNUSED, void *arg) { ! VarPattern *v = arg; char *msg; char *result; *************** *** 592,598 **** { size_t len; const char *ptr; ! VarPattern *pat = (VarPattern *)patp; if (*word->s != '\0') { if (addSpace) --- 592,598 ---- { size_t len; const char *ptr; ! VarPattern *pat = patp; if (*word->s != '\0') { if (addSpace) *************** *** 682,688 **** { size_t wordLen; /* Length of word */ const char *cp; /* General pointer */ ! VarPattern *pattern = (VarPattern *)patternp; wordLen = word->e - word->s; if ((pattern->flags & (VAR_SUB_ONE|VAR_SUB_MATCHED)) != --- 682,688 ---- { size_t wordLen; /* Length of word */ const char *cp; /* General pointer */ ! VarPattern *pattern = patternp; wordLen = word->e - word->s; if ((pattern->flags & (VAR_SUB_ONE|VAR_SUB_MATCHED)) != *************** *** 1072,1078 **** static char * VarQuote(const char *str, const struct Name *n UNUSED, void *islistp) { ! int islist = *((int *)islistp); BUFFER buf; /* This should cover most shells :-( */ --- 1072,1079 ---- static char * VarQuote(const char *str, const struct Name *n UNUSED, void *islistp) { ! int *p = islistp; ! int islist = *p; BUFFER buf; /* This should cover most shells :-( */ *************** *** 1224,1230 **** static void free_looparg(void *arg) { ! struct LoopStuff *l = (struct LoopStuff *)arg; Var_DeleteLoopVar(l->var); free(l->expand); --- 1225,1231 ---- static void free_looparg(void *arg) { ! struct LoopStuff *l = arg; Var_DeleteLoopVar(l->var); free(l->expand); *************** *** 1388,1394 **** static void free_patternarg(void *p) { ! VarPattern *vp = (VarPattern *)p; free(vp->lbuffer); free(vp->rhs); --- 1389,1395 ---- static void free_patternarg(void *p) { ! VarPattern *vp = p; free(vp->lbuffer); free(vp->rhs); *************** *** 1400,1406 **** do_regex(const char *s, const struct Name *n UNUSED, void *arg) { VarREPattern p2; ! VarPattern *p = (VarPattern *)arg; int error; char *result; --- 1401,1407 ---- do_regex(const char *s, const struct Name *n UNUSED, void *arg) { VarREPattern p2; ! VarPattern *p = arg; int error; char *result;