diff --git a/usr.bin/make/var_modify.c b/usr.bin/make/var_modify.c index 4929284b5d90..5b1ad20df5df 100644 --- a/usr.bin/make/var_modify.c +++ b/usr.bin/make/var_modify.c @@ -86,7 +86,7 @@ VarHead(const char *word, Boolean addSpace, Buffer buf, void *dummy __unused) * If no directory part, give . (q.v. the POSIX standard) */ if (addSpace) { - Buf_AddBytes(buf, 2, (Byte *)" ."); + Buf_AddBytes(buf, 2, (const Byte *)" ."); } else { Buf_AddByte(buf, (Byte)'.'); } @@ -121,9 +121,9 @@ VarTail(const char *word, Boolean addSpace, Buffer buf, void *dummy __unused) slash = strrchr(word, '/'); if (slash++ != NULL) { - Buf_AddBytes(buf, strlen(slash), (Byte *)slash); + Buf_AddBytes(buf, strlen(slash), (const Byte *)slash); } else { - Buf_AddBytes(buf, strlen(word), (Byte *)word); + Buf_AddBytes(buf, strlen(word), (const Byte *)word); } return (TRUE); } @@ -152,7 +152,7 @@ VarSuffix(const char *word, Boolean addSpace, Buffer buf, void *dummy __unused) if (addSpace) { Buf_AddByte(buf, (Byte)' '); } - Buf_AddBytes(buf, strlen(dot), (Byte *)dot); + Buf_AddBytes(buf, strlen(dot), (const Byte *)dot); addSpace = TRUE; } return (addSpace); @@ -256,7 +256,7 @@ VarSYSVMatch(const char *word, Boolean addSpace, Buffer buf, void *patp) if ((ptr = Str_SYSVMatch(word, pat->lhs, &len)) != NULL) Str_SYSVSubst(buf, pat->rhs, ptr, len); else - Buf_AddBytes(buf, strlen(word), (Byte *)word); + Buf_AddBytes(buf, strlen(word), (const Byte *)word); return (addSpace); } @@ -288,7 +288,7 @@ VarNoMatch(const char *word, Boolean addSpace, Buffer buf, void *pattern) Buf_AddByte(buf, (Byte)' '); } addSpace = TRUE; - Buf_AddBytes(buf, strlen(word), (Byte *)word); + Buf_AddBytes(buf, strlen(word), (const Byte *)word); } return (addSpace); } @@ -358,7 +358,7 @@ VarSubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) } Buf_AddBytes(buf, pattern->rightLen, (Byte *)pattern->rhs); Buf_AddBytes(buf, wordLen - pattern->leftLen, - (Byte *)(word + pattern->leftLen)); + (const Byte *)(word + pattern->leftLen)); } } else if (pattern->flags & VAR_MATCH_START) { /* @@ -387,7 +387,7 @@ VarSubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) } addSpace = TRUE; } - Buf_AddBytes(buf, cp - word, (Byte *)word); + Buf_AddBytes(buf, cp - word, (const Byte *)word); Buf_AddBytes(buf, pattern->rightLen, (Byte *)pattern->rhs); } else { /* @@ -419,7 +419,7 @@ VarSubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) Buf_AddByte(buf, (Byte)' '); addSpace = FALSE; } - Buf_AddBytes(buf, cp-word, (Byte *)word); + Buf_AddBytes(buf, cp-word, (const Byte *)word); Buf_AddBytes(buf, pattern->rightLen, (Byte *)pattern->rhs); wordLen -= (cp - word) + pattern->leftLen; word = cp + pattern->leftLen; @@ -434,7 +434,7 @@ VarSubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) if (addSpace) { Buf_AddByte(buf, (Byte)' '); } - Buf_AddBytes(buf, wordLen, (Byte *)word); + Buf_AddBytes(buf, wordLen, (const Byte *)word); } /* * If added characters to the buffer, need to add a space @@ -453,7 +453,7 @@ VarSubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) if (addSpace) { Buf_AddByte(buf, (Byte)' '); } - Buf_AddBytes(buf, wordLen, (Byte *)word); + Buf_AddBytes(buf, wordLen, (const Byte *)word); return (TRUE); } @@ -503,7 +503,7 @@ VarRESubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) pat->flags |= VAR_SUB_MATCHED; if (pat->matches[0].rm_so > 0) { MAYBE_ADD_SPACE(); - Buf_AddBytes(buf, pat->matches[0].rm_so, (Byte *)wp); + Buf_AddBytes(buf, pat->matches[0].rm_so, (const Byte *)wp); } for (rp = pat->replace; *rp; rp++) { @@ -547,7 +547,7 @@ VarRESubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) if (sublen > 0) { MAYBE_ADD_SPACE(); - Buf_AddBytes(buf, sublen, (Byte *)subbuf); + Buf_AddBytes(buf, sublen, (const Byte *)subbuf); } } else { MAYBE_ADD_SPACE(); @@ -568,7 +568,7 @@ VarRESubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) } if (*wp) { MAYBE_ADD_SPACE(); - Buf_AddBytes(buf, strlen(wp), (Byte *)wp); + Buf_AddBytes(buf, strlen(wp), (const Byte *)wp); } break; default: @@ -577,7 +577,7 @@ VarRESubstitute(const char *word, Boolean addSpace, Buffer buf, void *patternp) case REG_NOMATCH: if (*wp) { MAYBE_ADD_SPACE(); - Buf_AddBytes(buf, strlen(wp), (Byte *)wp); + Buf_AddBytes(buf, strlen(wp), (const Byte *)wp); } break; }