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

@ -68,7 +68,7 @@ typedef struct {
#define ReadDecA(src) for (i = 0; i < DSTRLNT; i++) \
src.val[DSTRLNT - 1 - i] = R[DECA + i];
static dstr_t Dstr_zero = { 0, 0, 0, 0, 0 };
static dstr_t Dstr_zero = { 0, { 0, 0, 0, 0 } };
extern uint32 *R;
extern uint32 CC;

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? */