SCP: Fix Coverity generated warnings

This commit is contained in:
Mark Pizzolato 2020-03-08 18:44:33 -07:00
parent 0170b7c6ab
commit 036e3bb933

4
scp.c
View file

@ -2811,7 +2811,7 @@ t_stat process_stdin_commands (t_stat stat, char *argv[], t_bool do_called)
char cbuf[4*CBUFSIZE], gbuf[CBUFSIZE]; char cbuf[4*CBUFSIZE], gbuf[CBUFSIZE];
CONST char *cptr; CONST char *cptr;
t_stat stat_nomessage; t_stat stat_nomessage;
CTAB *cmdp; CTAB *cmdp = NULL;
stat = SCPE_BARE_STATUS(stat); /* remove possible flag */ stat = SCPE_BARE_STATUS(stat); /* remove possible flag */
while (stat != SCPE_EXIT) { /* in case exit */ while (stat != SCPE_EXIT) { /* in case exit */
@ -15171,7 +15171,7 @@ for (i = 0; (dptr = sim_devices[i]) != NULL; i++) {
if (rptr->flags & REG_UNIT) { if (rptr->flags & REG_UNIT) {
if (udptr == NULL) { if (udptr == NULL) {
Bad = TRUE; Bad = TRUE;
Mprintf (f, "\tthe indicated UNIT can't be found for this $u depth array\n", rptr->depth); Mprintf (f, "\tthe indicated UNIT can't be found for this %u depth array\n", rptr->depth);
} }
else { else {
if (rptr->depth > udptr->numunits) { if (rptr->depth > udptr->numunits) {