1
0
mirror of https://github.com/simh/simh.git synced 2026-04-24 19:33:40 +00:00

sigma: Compiler warning cleanup

- Fix static structure initialization
- Fix inconsistent statement indentations.
- Avoid potential out of array indexing due to theoretical array
  reference via signed char index.  Likely non functional change.
This commit is contained in:
Mark Pizzolato
2020-10-19 12:29:39 -07:00
parent 69cb36b0f3
commit 0c782d2041
3 changed files with 5 additions and 5 deletions

View File

@@ -495,7 +495,7 @@ if ((sw & SWMASK ('C')) || ((*cptr == '"') && cptr++)) { /* chars? */
sc = 24 - (i * 8);
c = (sw & SWMASK ('A'))?
cptr[i] & 0x7F:
ascii_to_ebcdic[cptr[i]];
ascii_to_ebcdic[cptr[i] & 0177];
val[0] = (val[0] & ~(BMASK << sc)) | (c << sc);
}
return 0;
@@ -511,7 +511,7 @@ if ((sw & SWMASK ('E')) || ((*cptr == '\'') && cptr++)) { /* EBCDIC char? */
if (cptr[0] == 0) /* must have 1 char */
return SCPE_ARG;
sc = 24 - (addr & 0x3) * 8; /* shift count */
val[0] = (val[0] & ~(BMASK << sc)) | (ascii_to_ebcdic[cptr[0]] << sc);
val[0] = (val[0] & ~(BMASK << sc)) | (ascii_to_ebcdic[cptr[0] & 0177] << sc);
return 0;
}
if (sw & SWMASK ('B')) { /* byte? */