1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-02-10 02:00:54 +00:00

Attempt to clean up compiler warnings

as given in https://cirrus-ci.com/task/5117093567791104?command=main
This commit is contained in:
Olaf Seibert
2020-08-29 22:13:09 +02:00
parent 03bc707d3b
commit 94ec1830ca
7 changed files with 23 additions and 9 deletions

View File

@@ -423,7 +423,7 @@ void net_init_pf(struct dpchaos_s *dpchaos)
dbprintln("Can't find EA for \"%s\"", npf.osnpf_ifnam);
if (ife) {
dbprintln("Found interface '%s', ea %s", ife->ife_name,
(ife->ife_ea != NULL && memcmp(ife->ife_ea,"\0\0\0\0\0\0", ETHER_ADDR_LEN) == 0) ? "found" : "not found");
(memcmp(ife->ife_ea,"\0\0\0\0\0\0", ETHER_ADDR_LEN) == 0) ? "found" : "not found");
} else
dbprintln("Can't find interface '%s'!", npf.osnpf_ifnam);
} else {
@@ -1287,7 +1287,7 @@ pfbuild(void *arg, struct in_addr *ipa)
// Check the ethernet type field
#if KLH10_NET_PCAP
#define MAX_PFLEN 136 // really need only 130
u_char bpfilter[MAX_PFLEN];
char bpfilter[MAX_PFLEN];
char eastr[OSN_EASTRSIZ];
// must also check for address since interface may be in promisc mode although we didn't ask for it
sprintf(bpfilter,

View File

@@ -592,7 +592,7 @@ ch11_cmd_status(struct ch11 *ch, FILE *of)
if (dpc->dpchaos_ifmeth_chudp)
fprintf(of, " CHUDP port: %d.\n", ch->ch_chudp_port);
else {
if (dpc->dpchaos_ifnam)
if (dpc->dpchaos_ifnam[0])
fprintf(of, " Using ifc=\"%s\"", dpc->dpchaos_ifnam);
fprintf(of, " ether addr %02X:%02X:%02X:%02X:%02X:%02X\n",
dpc->dpchaos_eth[0],dpc->dpchaos_eth[1],dpc->dpchaos_eth[2],
@@ -627,12 +627,12 @@ ch11_cmd_status(struct ch11 *ch, FILE *of)
(int)dp_xrcmd(dp_dpxfr(&ch->ch_dp)), (int)dp_xrcnt(dp_dpxfr(&ch->ch_dp)));
fprintf(of,"Input buffer: ");
if (ch->ch_iptr)
fprintf(of,"%d chars\n",ch->ch_iptr - ch->ch_rbuf);
fprintf(of,"%d chars\n", (int)(ch->ch_iptr - ch->ch_rbuf));
else
fprintf(of,"none\n");
fprintf(of,"Output buffer: ");
if (ch->ch_optr)
fprintf(of,"%d chars\n",ch->ch_optr - ch->ch_sbuf);
fprintf(of,"%d chars\n", (int)(ch->ch_optr - ch->ch_sbuf));
else
fprintf(of,"none\n");
fprintf(of,"Receive count: %d\n", ch->ch_rcnt);
@@ -815,7 +815,7 @@ ch11_read(struct device *d, register uint18 addr)
chaos_start(ch);
switch (addr) {
/* case UB_CHWBF: /* Write buffer (write only) = CHMYN */
/* case UB_CHWBF: / * Write buffer (write only) = CHMYN */
/* break; */
case UB_CHMYN: /* My chaos address (read only) */
val = ch->ch_myaddr;

View File

@@ -302,7 +302,7 @@ int lites_init (unsigned int prt)
if (prt == 0)
return lites_init_usb ();
/* enable access to the port */
if (ret = !ioperm (prt,PORT_MAX,ENABLE)) {
if ((ret = !ioperm (prt,PORT_MAX,ENABLE))) {
port = prt; /* access granted, note port */
outb (0,port+PORT_CONTROL); /* initialize the displays */
for (i = 0; i <= UNIT_MAX; --i) {

View File

@@ -261,7 +261,9 @@ insdef(i_extend)
#elif KLH10_CPU_KS
# if (IX_N == 040 || IX_N == 020) /* Faster check if power of 2 */
if (LHGET(xw) & (((~(IX_N-1))<<9) | (AC_MASK<<5))) /* Check op and AC fields */
# define IX_MASK ((~(unsigned int)(IX_N-1))<<9)
if (LHGET(xw) & (IX_MASK | (AC_MASK<<5))) /* Check op and AC fields */
# undef IX_MASK
# else
if (xop >= IX_N || (LHGET(xw) & (AC_MASK<<5))) /* Check op, AC field */
# endif

View File

@@ -1092,6 +1092,8 @@ clk_itusset(int32 usec)
case CLKENT_ST_MQUIET:
ce->cke_oticks = clk_usec2tick(ce->cke_usec);
break;
default:
break;
}
}

View File

@@ -913,7 +913,7 @@ os_rtmget(register osrtm_t *art)
{
#if HAVE_SETITIMER /* && HAVE_GETTIMEOFDAY ; implied */
static osrtm_t os_last_rtm = {0,0};
if (!gettimeofday(art, (struct timezone *)NULL) == 0)
if (gettimeofday(art, (struct timezone *)NULL) != 0)
return FALSE;
/* did time go backwards? */
if ((os_last_rtm.tv_sec > art->tv_sec) ||

View File

@@ -1804,6 +1804,9 @@ vmt_rspace(register struct vmtape *t,
while (tpc_recfwd(t) > 0
&& !t->mt_eof && !t->mt_eot && --cnt) ;
break;
default:
/* Unexpected tape format value */
break;
}
t->mt_frames = origcnt - cnt;
return TRUE;
@@ -3070,6 +3073,10 @@ vmt_rput(register struct vmtape *t,
return FALSE;
}
break;
default:
/* Unexpected tape format value */
break;
}
return vmt_ioend(t);
}
@@ -3099,6 +3106,9 @@ vmt_eput(register struct vmtape *t,
case VMT_FMT_TPS:
/* Possible but not implemented yet */
break;
default:
/* Unexpected tape format value */
break;
}
return TRUE;
}