COMP: Fixed conversion warnings.

This commit is contained in:
Brad King 2005-06-09 07:40:41 -04:00
parent 1046ba0f08
commit c7a61b9802
1 changed files with 5 additions and 5 deletions

View File

@ -426,7 +426,7 @@ static char* reg (int paren, int *flagp) {
} }
parno = regnpar; parno = regnpar;
regnpar++; regnpar++;
ret = regnode(OPEN + parno); ret = regnode(static_cast<char>(OPEN + parno));
} }
else else
ret = 0; ret = 0;
@ -454,7 +454,7 @@ static char* reg (int paren, int *flagp) {
} }
// Make a closing node, and hook it on the end. // Make a closing node, and hook it on the end.
ender = regnode((paren) ? CLOSE + parno : END); ender = regnode(static_cast<char>((paren) ? CLOSE + parno : END));
regtail(ret, ender); regtail(ret, ender);
// Hook the tails of the branches to the closing node. // Hook the tails of the branches to the closing node.
@ -638,7 +638,7 @@ static char* regatom (int *flagp) {
return 0; return 0;
} }
for (; rxpclass <= rxpclassend; rxpclass++) for (; rxpclass <= rxpclassend; rxpclass++)
regc(rxpclass); regc(static_cast<unsigned char>(rxpclass));
regparse++; regparse++;
} }
} }
@ -801,8 +801,8 @@ static void regtail (char* p, const char* val) {
offset = int(scan - val); offset = int(scan - val);
else else
offset = int(val - scan); offset = int(val - scan);
*(scan + 1) = (offset >> 8) & 0377; *(scan + 1) = static_cast<char>((offset >> 8) & 0377);
*(scan + 2) = offset & 0377; *(scan + 2) = static_cast<char>(offset & 0377);
} }