From c3490e14849cab0493774983d48447613f630a7d Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Mon, 12 Oct 2020 23:27:46 -0400 Subject: [PATCH] ICL1900: Remove compiler warnings. --- ICL1900/icl1900_cp.c | 12 ++++++------ ICL1900/icl1900_cpu.c | 2 +- ICL1900/icl1900_cr.c | 14 +++++++------- ICL1900/icl1900_cty.c | 8 ++++---- ICL1900/icl1900_defs.h | 6 +++--- ICL1900/icl1900_eds8.c | 4 ++-- ICL1900/icl1900_lp.c | 14 +++++++------- ICL1900/icl1900_mt.c | 4 ++-- ICL1900/icl1900_mta.c | 8 ++++---- ICL1900/icl1900_stdio.c | 6 +++--- ICL1900/icl1900_tp.c | 12 ++++++------ ICL1900/icl1900_tr.c | 12 ++++++------ 12 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ICL1900/icl1900_cp.c b/ICL1900/icl1900_cp.c index 4648b75..c7057f7 100644 --- a/ICL1900/icl1900_cp.c +++ b/ICL1900/icl1900_cp.c @@ -60,9 +60,9 @@ MODE_029 -void cdp_cmd (int dev, uint32 cmd, uint32 *resp); -void cdp_nsi_cmd (int dev, uint32 cmd); -void cdp_nsi_status (int dev, uint32 *resp); +void cdp_cmd (uint32 dev, uint32 cmd, uint32 *resp); +void cdp_nsi_cmd (uint32 dev, uint32 cmd); +void cdp_nsi_status (uint32 dev, uint32 *resp); t_stat cdp_svc (UNIT *uptr); t_stat cdp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr); CONST char *cdp_description (DEVICE *dptr); @@ -102,7 +102,7 @@ DEVICE cdp_dev = { */ -void cdp_cmd(int dev, uint32 cmd, uint32 *resp) { +void cdp_cmd(uint32 dev, uint32 cmd, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -164,7 +164,7 @@ void cdp_cmd(int dev, uint32 cmd, uint32 *resp) { * xxxx01 Start punch. * xxxx10 Stop punch. */ -void cdp_nsi_cmd(int dev, uint32 cmd) { +void cdp_nsi_cmd(uint32 dev, uint32 cmd) { uint32 i; UNIT *uptr = NULL; @@ -214,7 +214,7 @@ void cdp_nsi_cmd(int dev, uint32 cmd) { * 020 ACCEPT * 040 BUSY */ -void cdp_nsi_status(int dev, uint32 *resp) { +void cdp_nsi_status(uint32 dev, uint32 *resp) { uint32 i; UNIT *uptr = NULL; diff --git a/ICL1900/icl1900_cpu.c b/ICL1900/icl1900_cpu.c index 9f345d2..461b051 100644 --- a/ICL1900/icl1900_cpu.c +++ b/ICL1900/icl1900_cpu.c @@ -1362,7 +1362,7 @@ branch: RB &= M23; n = (RA & B0) != 0; temp = (RA & BM1) != 0; - if (n != temp) { + if ((uint32)n != temp) { BV = 1; if (!exe_mode && (Mode & 7) == 4) SR64 |= B2; diff --git a/ICL1900/icl1900_cr.c b/ICL1900/icl1900_cr.c index 5f522fc..bf3d183 100644 --- a/ICL1900/icl1900_cr.c +++ b/ICL1900/icl1900_cr.c @@ -64,9 +64,9 @@ UNIT_DISABLE|UNIT_RO|MODE_029 -void cdr_cmd (int dev, uint32 cmd, uint32 *resp); -void cdr_nsi_cmd (int dev, uint32 cmd); -void cdr_nsi_status (int dev, uint32 *resp); +void cdr_cmd (uint32 dev, uint32 cmd, uint32 *resp); +void cdr_nsi_cmd (uint32 dev, uint32 cmd); +void cdr_nsi_status (uint32 dev, uint32 *resp); t_stat cdr_svc (UNIT *uptr); t_stat cdr_boot (int32 unit_num, DEVICE * dptr); t_stat cdr_reset (DEVICE *dptr); @@ -113,7 +113,7 @@ DEVICE cdr_dev = { */ -void cdr_cmd(int dev, uint32 cmd, uint32 *resp) { +void cdr_cmd(uint32 dev, uint32 cmd, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -178,7 +178,7 @@ void cdr_cmd(int dev, uint32 cmd, uint32 *resp) { * xxxx01 Start reader. * xxxx10 Stop reader. */ -void cdr_nsi_cmd(int dev, uint32 cmd) { +void cdr_nsi_cmd(uint32 dev, uint32 cmd) { uint32 i; UNIT *uptr = NULL; @@ -228,7 +228,7 @@ void cdr_nsi_cmd(int dev, uint32 cmd) { * 020 ACCEPT * 040 BUSY */ -void cdr_nsi_status(int dev, uint32 *resp) { +void cdr_nsi_status(uint32 dev, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -323,7 +323,7 @@ t_stat cdr_svc (UNIT *uptr) t_stat cdr_reset(DEVICE *dptr) { - int i; + unsigned int i; memset(&hol_to_mem[0], 0xff, 4096); for(i = 0; i < (sizeof(mem_to_hol)/sizeof(uint16)); i++) { diff --git a/ICL1900/icl1900_cty.c b/ICL1900/icl1900_cty.c index 5d3e09b..6ac8d44 100644 --- a/ICL1900/icl1900_cty.c +++ b/ICL1900/icl1900_cty.c @@ -28,8 +28,8 @@ #include "icl1900_defs.h" extern int32 tmxr_poll; -void cty_cmd(int dev, uint32 cmd); -void cty_status(int dev, uint32 *resp); +void cty_cmd(uint32 dev, uint32 cmd); +void cty_status(uint32 dev, uint32 *resp); t_stat ctyi_svc (UNIT *uptr); t_stat ctyo_svc (UNIT *uptr); t_stat cty_reset (DEVICE *dptr); @@ -101,7 +101,7 @@ DEVICE cty_dev = { * 11xxxx -> 101xxxx * */ -void cty_cmd(int dev, uint32 cmd) { +void cty_cmd(uint32 dev, uint32 cmd) { int u = 0; if (dev > 3) @@ -122,7 +122,7 @@ void cty_cmd(int dev, uint32 cmd) { chan_clr_done(GET_UADDR(cty_unit[u].flags)); } -void cty_status(int dev, uint32 *resp) { +void cty_status(uint32 dev, uint32 *resp) { int u = 0; if (dev > 3) diff --git a/ICL1900/icl1900_defs.h b/ICL1900/icl1900_defs.h index e72aa01..681186f 100755 --- a/ICL1900/icl1900_defs.h +++ b/ICL1900/icl1900_defs.h @@ -250,9 +250,9 @@ t_opcode; struct icl_dib { uint8 type; /* Type of device */ - void (*si_cmd)(int dev, uint32 cmd, uint32 *resp); /* Start io on device */ - void (*nsi_cmd)(int dev, uint32 cmd); /* Start non-standard I/O on device */ - void (*nsi_status)(int dev, uint32 *resp); /* Non-Standard I/O status */ + void (*si_cmd)(uint32 dev, uint32 cmd, uint32 *resp); /* Start io on device */ + void (*nsi_cmd)(uint32 dev, uint32 cmd); /* Start non-standard I/O on device */ + void (*nsi_status)(uint32 dev, uint32 *resp); /* Non-Standard I/O status */ }; typedef struct icl_dib DIB; diff --git a/ICL1900/icl1900_eds8.c b/ICL1900/icl1900_eds8.c index 01297ff..15c4e7d 100644 --- a/ICL1900/icl1900_eds8.c +++ b/ICL1900/icl1900_eds8.c @@ -100,7 +100,7 @@ int eds8_busy; /* Indicates that controller is talking to a drive */ int eds8_drive; /* Indicates last selected drive */ uint32 eds8_buffer[WD_SEC]; -void eds8_cmd (int dev, uint32 cmd, uint32 *resp); +void eds8_cmd (uint32 dev, uint32 cmd, uint32 *resp); t_stat eds8_svc (UNIT *uptr); t_stat eds8_reset (DEVICE *dptr); t_stat eds8_boot (int32 unit_num, DEVICE * dptr); @@ -139,7 +139,7 @@ DEVICE eds8_dev = { NULL, NULL, &eds8_help, NULL, NULL, &eds8_description }; -void eds8_cmd(int dev, uint32 cmd, uint32 *resp) { +void eds8_cmd(uint32 dev, uint32 cmd, uint32 *resp) { UNIT *uptr = &eds8_unit[eds8_drive]; *resp = 0; if (cmd & 0400) { diff --git a/ICL1900/icl1900_lp.c b/ICL1900/icl1900_lp.c index 079dc42..67fc734 100644 --- a/ICL1900/icl1900_lp.c +++ b/ICL1900/icl1900_lp.c @@ -73,9 +73,9 @@ #define UNIT_LPR(x) UNIT_ADDR(x)|SET_TYPE(T1931_2)|UNIT_ATTABLE|UNIT_DISABLE -void lpr_cmd (int dev, uint32 cmd, uint32 *resp); -void lpr_nsi_cmd (int dev, uint32 cmd); -void lpr_nsi_status (int dev, uint32 *resp); +void lpr_cmd (uint32 dev, uint32 cmd, uint32 *resp); +void lpr_nsi_cmd (uint32 dev, uint32 cmd); +void lpr_nsi_status (uint32 dev, uint32 *resp); t_stat lpr_svc (UNIT *uptr); t_stat lpr_reset (DEVICE *dptr); t_stat lpr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr); @@ -122,7 +122,7 @@ DEVICE lpr_dev = { */ -void lpr_cmd(int dev, uint32 cmd, uint32 *resp) { +void lpr_cmd(uint32 dev, uint32 cmd, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -185,7 +185,7 @@ void lpr_cmd(int dev, uint32 cmd, uint32 *resp) { * xxxx01 Start print. * xxxx10 Stop print. */ -void lpr_nsi_cmd(int dev, uint32 cmd) { +void lpr_nsi_cmd(uint32 dev, uint32 cmd) { uint32 i; UNIT *uptr = NULL; @@ -235,7 +235,7 @@ void lpr_nsi_cmd(int dev, uint32 cmd) { * 020 ACCEPT * 040 BUSY */ -void lpr_nsi_status(int dev, uint32 *resp) { +void lpr_nsi_status(uint32 dev, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -301,7 +301,7 @@ t_stat lpr_svc (UNIT *uptr) else if (LW_160(uptr->flags)) len = 160; i = 0; - while (eor == 0 && i < len && i flags), &ch, 0); if (uptr->CMD & AUTO) { uptr->CMD |= (int32)ch << 8; diff --git a/ICL1900/icl1900_mt.c b/ICL1900/icl1900_mt.c index 666681e..b5cfcef 100644 --- a/ICL1900/icl1900_mt.c +++ b/ICL1900/icl1900_mt.c @@ -102,7 +102,7 @@ int mt_busy; /* Indicates that controller is talking to a drive */ int mt_drive; /* Indicates last selected drive */ uint8 mt_buffer[BUFFSIZE]; -void mt_cmd (int dev, uint32 cmd, uint32 *resp); +void mt_cmd (uint32 dev, uint32 cmd, uint32 *resp); t_stat mt_svc (UNIT *uptr); t_stat mt_reset (DEVICE *dptr); t_stat mt_boot (int32 unit_num, DEVICE * dptr); @@ -143,7 +143,7 @@ DEVICE mt_dev = { NULL, NULL, &mt_help, NULL, NULL, &mt_description }; -void mt_cmd(int dev, uint32 cmd, uint32 *resp) { +void mt_cmd(uint32 dev, uint32 cmd, uint32 *resp) { UNIT *uptr = &mt_unit[mt_drive]; *resp = 0; if (cmd & 0400) { diff --git a/ICL1900/icl1900_mta.c b/ICL1900/icl1900_mta.c index 7107b18..31aa5f2 100644 --- a/ICL1900/icl1900_mta.c +++ b/ICL1900/icl1900_mta.c @@ -104,8 +104,8 @@ int mta_busy; /* Indicates that controller is talking to a drive */ uint8 mta_buffer[BUFFSIZE]; -void mta_nsi_cmd (int dev, uint32 cmd); -void mta_nsi_status (int dev, uint32 *resp); +void mta_nsi_cmd (uint32 dev, uint32 cmd); +void mta_nsi_status (uint32 dev, uint32 *resp); t_stat mta_svc (UNIT *uptr); t_stat mta_reset (DEVICE *dptr); t_stat mta_boot (int32 unit_num, DEVICE * dptr); @@ -148,7 +148,7 @@ DEVICE mta_dev = { NULL, NULL, &mta_help, NULL, NULL, &mta_description }; -void mta_nsi_cmd(int dev, uint32 cmd) { +void mta_nsi_cmd(uint32 dev, uint32 cmd) { int32 d; UNIT *uptr; @@ -185,7 +185,7 @@ void mta_nsi_cmd(int dev, uint32 cmd) { } } -void mta_nsi_status(int dev, uint32 *resp) { +void mta_nsi_status(uint32 dev, uint32 *resp) { int32 d; UNIT *uptr; diff --git a/ICL1900/icl1900_stdio.c b/ICL1900/icl1900_stdio.c index b76e966..1e755d2 100644 --- a/ICL1900/icl1900_stdio.c +++ b/ICL1900/icl1900_stdio.c @@ -41,9 +41,9 @@ DIB nul_dib = { 0, NULL, NULL, NULL}; t_stat chan_set_devs() { - int i; - uint32 j; - int chan; + unsigned int i; + uint32 j; + int chan; /* Clear device table */ for (i = 0; i < sizeof(devs)/sizeof(DIB *); i++) diff --git a/ICL1900/icl1900_tp.c b/ICL1900/icl1900_tp.c index a44e90f..3b92bb2 100644 --- a/ICL1900/icl1900_tp.c +++ b/ICL1900/icl1900_tp.c @@ -107,9 +107,9 @@ * */ -void ptp_cmd (int dev, uint32 cmd, uint32 *resp); -void ptp_nsi_cmd (int dev, uint32 cmd); -void ptp_nsi_status (int dev, uint32 *resp); +void ptp_cmd (uint32 dev, uint32 cmd, uint32 *resp); +void ptp_nsi_cmd (uint32 dev, uint32 cmd); +void ptp_nsi_status (uint32 dev, uint32 *resp); t_stat ptp_svc (UNIT *uptr); t_stat ptp_reset (DEVICE *dptr); t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr); @@ -159,7 +159,7 @@ DEVICE ptp_dev = { */ -void ptp_cmd(int dev, uint32 cmd, uint32 *resp) { +void ptp_cmd(uint32 dev, uint32 cmd, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -241,7 +241,7 @@ void ptp_cmd(int dev, uint32 cmd, uint32 *resp) { * x1xxxx Graphics mode. * 1xxxxx Punch blanks. */ -void ptp_nsi_cmd(int dev, uint32 cmd) { +void ptp_nsi_cmd(uint32 dev, uint32 cmd) { uint32 i; UNIT *uptr = NULL; @@ -298,7 +298,7 @@ void ptp_nsi_cmd(int dev, uint32 cmd) { * 020 ACCEPT * 040 BUSY */ -void ptp_nsi_status(int dev, uint32 *resp) { +void ptp_nsi_status(uint32 dev, uint32 *resp) { uint32 i; UNIT *uptr = NULL; diff --git a/ICL1900/icl1900_tr.c b/ICL1900/icl1900_tr.c index 04b46bb..124ade6 100644 --- a/ICL1900/icl1900_tr.c +++ b/ICL1900/icl1900_tr.c @@ -108,9 +108,9 @@ * */ -void ptr_cmd (int dev, uint32 cmd, uint32 *resp); -void ptr_nsi_cmd (int dev, uint32 cmd); -void ptr_nsi_status (int dev, uint32 *resp); +void ptr_cmd (uint32 dev, uint32 cmd, uint32 *resp); +void ptr_nsi_cmd (uint32 dev, uint32 cmd); +void ptr_nsi_status (uint32 dev, uint32 *resp); t_stat ptr_svc (UNIT *uptr); t_stat ptr_reset (DEVICE *dptr); t_stat ptr_boot (int32 unit_num, DEVICE * dptr); @@ -163,7 +163,7 @@ DEVICE ptr_dev = { */ -void ptr_cmd(int dev, uint32 cmd, uint32 *resp) { +void ptr_cmd(uint32 dev, uint32 cmd, uint32 *resp) { uint32 i; UNIT *uptr = NULL; @@ -247,7 +247,7 @@ void ptr_cmd(int dev, uint32 cmd, uint32 *resp) { * x1xxxx Graphics mode. * 1xxxxx All characters. */ -void ptr_nsi_cmd(int dev, uint32 cmd) { +void ptr_nsi_cmd(uint32 dev, uint32 cmd) { uint32 i; UNIT *uptr = NULL; @@ -308,7 +308,7 @@ void ptr_nsi_cmd(int dev, uint32 cmd) { * 020 ACCEPT * 040 BUSY */ -void ptr_nsi_status(int dev, uint32 *resp) { +void ptr_nsi_status(uint32 dev, uint32 *resp) { uint32 i; UNIT *uptr = NULL;