1
0
mirror of https://github.com/simh/simh.git synced 2026-01-30 21:32:27 +00:00

Cleanup for warning messages produced by the clang C compiler. Mostly adding parentheses in conditional assignments and clarification parentheses in complex boolean expressions.

This commit is contained in:
Mark Pizzolato
2012-04-29 11:59:44 -07:00
parent 3775c17034
commit 0f8e6cfe95
112 changed files with 596 additions and 592 deletions

View File

@@ -208,10 +208,10 @@ if ((cptr == NULL) || (*cptr == 0))
return SCPE_2FARG;
while (*cptr != 0) { /* do all mods */
cptr = get_glyph_nc (cptr, gbuf, ','); /* get modifier */
if (cvptr = strchr (gbuf, '=')) /* = value? */
if ((cvptr = strchr (gbuf, '='))) /* = value? */
*cvptr++ = 0;
get_glyph (gbuf, gbuf, 0); /* modifier to UC */
if (ctptr = find_ctab (set_con_tab, gbuf)) { /* match? */
if ((ctptr = find_ctab (set_con_tab, gbuf))) { /* match? */
r = ctptr->action (ctptr->arg, cvptr); /* do the rest */
if (r != SCPE_OK)
return r;
@@ -236,7 +236,7 @@ if (*cptr == 0) { /* show all */
}
while (*cptr != 0) {
cptr = get_glyph (cptr, gbuf, ','); /* get modifier */
if (shptr = find_shtab (show_con_tab, gbuf))
if ((shptr = find_shtab (show_con_tab, gbuf)))
shptr->action (st, dptr, uptr, shptr->arg, cptr);
else return SCPE_NOPARAM;
}
@@ -425,7 +425,7 @@ if ((cptr == NULL) || (*cptr == 0))
return SCPE_2FARG;
while (*cptr != 0) { /* do all mods */
cptr = get_glyph_nc (cptr, gbuf, ','); /* get modifier */
if (cvptr = strchr (gbuf, '=')) /* = value? */
if ((cvptr = strchr (gbuf, '='))) /* = value? */
*cvptr++ = 0;
get_glyph (gbuf, gbuf, 0); /* modifier to UC */
if (isdigit (*gbuf)) {
@@ -434,8 +434,8 @@ while (*cptr != 0) { /* do all mods */
return tmxr_open_master (&sim_con_tmxr, gbuf); /* open master socket */
}
else
if (ctptr = find_ctab (set_con_telnet_tab, gbuf)) { /* match? */
r = ctptr->action (ctptr->arg, cvptr); /* do the rest */
if ((ctptr = find_ctab (set_con_telnet_tab, gbuf))) { /* match? */
r = ctptr->action (ctptr->arg, cvptr); /* do the rest */
if (r != SCPE_OK)
return r;
}
@@ -696,7 +696,7 @@ if (sim_con_ldsc.conn == 0) { /* no Telnet conn? */
return SCPE_OK; /* unconnected and buffered - nothing to receive */
}
tmxr_poll_rx (&sim_con_tmxr); /* poll for input */
if (c = tmxr_getc_ln (&sim_con_ldsc)) /* any char? */
if ((c = tmxr_getc_ln (&sim_con_ldsc))) /* any char? */
return (c & (SCPE_BREAK | 0377)) | SCPE_KFLAG;
return SCPE_OK;
}