mirror of
https://github.com/PDP-10/klh10.git
synced 2026-01-11 23:52:54 +00:00
Merge pull request #50 from PDP-10/fix-some-compiler-warnings
Clean up compiler warnings.
This commit is contained in:
commit
6ac420eede
@ -1,7 +1,7 @@
|
||||
/* CMDLINE.H - header file for command line processing functions
|
||||
*/
|
||||
/* Copyright © 1992, 1993, 2001 Kenneth L. Harrenstien
|
||||
/* Copyright © 2017 Olaf Seibert
|
||||
** Copyright © 2017 Olaf Seibert
|
||||
** All Rights Reserved
|
||||
**
|
||||
** This file is part of the KLH10 Distribution. Use, modification, and
|
||||
|
||||
@ -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,
|
||||
|
||||
10
src/dvch11.c
10
src/dvch11.c
@ -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;
|
||||
@ -893,7 +893,7 @@ ch11_write(struct device *d, uint18 addr, register dvureg_t val)
|
||||
chaos_start(ch);
|
||||
|
||||
switch (addr) {
|
||||
/* case UB_CHMYN: /* My chaos address (read only) = CHWBF */
|
||||
/* case UB_CHMYN: / * My chaos address (read only) = CHWBF */
|
||||
case UB_CHRBF: /* Read buffer (read only) */
|
||||
case UB_CHRBC: /* Receive bit counter (read only) */
|
||||
case UB_CHXMT: /* Initiate transmit (read only) */
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1092,6 +1092,8 @@ clk_itusset(int32 usec)
|
||||
case CLKENT_ST_MQUIET:
|
||||
ce->cke_oticks = clk_usec2tick(ce->cke_usec);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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) ||
|
||||
|
||||
10
src/vmtape.c
10
src/vmtape.c
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user