diff --git a/config11/config11.c b/config11/config11.c index 3b6c0f1..540ebca 100644 --- a/config11/config11.c +++ b/config11/config11.c @@ -29,6 +29,7 @@ #include #include #include +#include #define RANK_LNT 34 @@ -57,12 +58,16 @@ char *namtab[RANK_LNT] = { int main (int argc, char *argv[]) { +(void)argc; (void)argv; + for ( ;; ) { for (i = 0; i < RANK_LNT; i++) numctl[i] = 0; printf ("Enter configuration data\n"); for ( ;; ) { printf ("Name:\t"); - if (gets (inp) == NULL) return 0; + if (fgets (inp, sizeof(inp), stdin) == NULL) return 0; + /* Remove trailing newline if present */ + if (inp[strlen(inp)-1] == '\n') inp[strlen(inp)-1] = '\0'; if (*inp == 0) break; for (cp = inp; *cp != 0; cp++) *cp = toupper (*cp); for (rank = 0; rank < RANK_LNT; rank++) { @@ -75,7 +80,9 @@ for ( ;; ) { printf ("\n"); continue; } printf ("Number:\t"); - gets (inp); + if (fgets (inp, sizeof(inp), stdin) == NULL) continue; + /* Remove trailing newline if present */ + if (inp[strlen(inp)-1] == '\n') inp[strlen(inp)-1] = '\0'; errno = 0; num = strtoul (inp, &ocp, 10); if (errno || (inp == ocp)) { @@ -101,7 +108,7 @@ for ( ;; ) { for (j = 1; j < numctl[i]; j++) { printf ("\t\t %d\t%06o\n", j + 1, csr); csr = (csr + modtab[i] + 1) & ~modtab[i]; } - printf (" %\t\tgap\t%06o\n", csr); + printf (" %%\t\tgap\t%06o\n", csr); } if ((i + 1) < RANK_LNT) csr = (csr + modtab[i+1] + 1) & ~modtab[i+1]; } diff --git a/converters/asc/asc.c b/converters/asc/asc.c index 44630f0..5532f37 100644 --- a/converters/asc/asc.c +++ b/converters/asc/asc.c @@ -71,7 +71,7 @@ else mode = MD_WIN; for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/decsys/decsys.c b/converters/decsys/decsys.c index ac12d34..b5c7093 100644 --- a/converters/decsys/decsys.c +++ b/converters/decsys/decsys.c @@ -31,7 +31,7 @@ int main (int argc, char *argv[]) { -int i, j, k, word; +int i, k, word; char *ppos, oname[256]; int fill[256] = { 0 }; FILE *ifile, *ofile; @@ -42,7 +42,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".dtp"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".dtp"); else strcat (oname, ".dtp"); ifile = fopen (argv[i], "r"); if (ifile == NULL) { @@ -55,7 +55,7 @@ for (i = 1; i < argc; i++) { printf ("Processing file %s\n", argv[i]); fwrite (fill, sizeof (int), 256, ofile); - for (j = 0;; j++) { + for (;;) { k = fscanf (ifile, "%d", &word); if (k == EOF) break; // printf ("%06o\n", word); diff --git a/converters/dtos8cvt/dtos8cvt.c b/converters/dtos8cvt/dtos8cvt.c index 8a0b4c0..0d6b495 100644 --- a/converters/dtos8cvt/dtos8cvt.c +++ b/converters/dtos8cvt/dtos8cvt.c @@ -42,7 +42,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".dt8"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".dt8"); else strcat (oname, ".dt8"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/gt7cvt/gt7cvt.c b/converters/gt7cvt/gt7cvt.c index 690728d..27f8d27 100644 --- a/converters/gt7cvt/gt7cvt.c +++ b/converters/gt7cvt/gt7cvt.c @@ -31,7 +31,7 @@ #define FLPSIZ 65536 unsigned char fzero[4] = { 0 }; -int dump_rec (FILE *of, int bc, char *buf) +int dump_rec (FILE *of, int bc, unsigned char *buf) { unsigned char buc[4]; @@ -62,7 +62,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".tap"); else strcat (oname, ".tap"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/hpconvert/hpconvert.c b/converters/hpconvert/hpconvert.c index 93d8ff5..0201b8f 100644 --- a/converters/hpconvert/hpconvert.c +++ b/converters/hpconvert/hpconvert.c @@ -173,7 +173,8 @@ int main (int argc, char sig_fwd [SIGNATURE_SIZE], sig_rev [SIGNATURE_SIZE]; char hold, cylinder [CYLINDER_SIZE]; bool identified = false, reversed = false, debug = false; - int i, cyl, from_cyl, to_cyl, remap; + size_t i; + int cyl, from_cyl, to_cyl, remap; int platter, cylinder_size, hole_size; @@ -247,7 +248,15 @@ int main (int argc, /* Generate a temporary filename for the converted image. */ - name_out = tmpnam (NULL); + char temp_template[] = "/tmp/hpconvert_XXXXXX"; + int temp_fd = mkstemp(temp_template); + if (temp_fd == -1) { + puts ("Error: cannot generate a temporary filename."); + fclose (fin); + return 1; + } + close(temp_fd); + name_out = temp_template; if (name_out == NULL) { puts ("Error: cannot generate a temporary filename."); diff --git a/converters/indent/indent.c b/converters/indent/indent.c index 03760f1..7dbe160 100644 --- a/converters/indent/indent.c +++ b/converters/indent/indent.c @@ -45,7 +45,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "ra"); if (ifile == NULL) { diff --git a/converters/littcvt/littcvt.c b/converters/littcvt/littcvt.c index 617d1ca..10c2580 100644 --- a/converters/littcvt/littcvt.c +++ b/converters/littcvt/littcvt.c @@ -44,7 +44,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/m8376/m8376.c b/converters/m8376/m8376.c index 48ac147..35d003e 100644 --- a/converters/m8376/m8376.c +++ b/converters/m8376/m8376.c @@ -38,6 +38,8 @@ char fname[256]; int c, i, j; unsigned int wd[1024]; +(void)argc; (void)argv; + for (i = 0; i < 8; i++) { sprintf (fname, "C:\\temp\\m8376\\m8376e%03d.bin", fnum[i]); fi[i] = fopen (fname, "rb"); diff --git a/converters/mt2tpc/mt2tpc.c b/converters/mt2tpc/mt2tpc.c index 8bf4acf..e6c5eca 100644 --- a/converters/mt2tpc/mt2tpc.c +++ b/converters/mt2tpc/mt2tpc.c @@ -46,7 +46,7 @@ if (argc < 2) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".tpc"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".tpc"); else strcat (oname, ".tpc"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/mtcvt23/mtcvtv23.c b/converters/mtcvt23/mtcvtv23.c index 3b150c5..ebffe78 100644 --- a/converters/mtcvt23/mtcvtv23.c +++ b/converters/mtcvt23/mtcvtv23.c @@ -43,7 +43,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".tap"); else strcat (oname, ".tap"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/mtcvtfix/mtcvtfix.c b/converters/mtcvtfix/mtcvtfix.c index bc0f922..01cd8ce 100644 --- a/converters/mtcvtfix/mtcvtfix.c +++ b/converters/mtcvtfix/mtcvtfix.c @@ -45,7 +45,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/mtcvtodd/mtcvtodd.c b/converters/mtcvtodd/mtcvtodd.c index e00c357..0813679 100644 --- a/converters/mtcvtodd/mtcvtodd.c +++ b/converters/mtcvtodd/mtcvtodd.c @@ -43,7 +43,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/noff/noff.c b/converters/noff/noff.c index 1234050..d82211b 100644 --- a/converters/noff/noff.c +++ b/converters/noff/noff.c @@ -33,7 +33,7 @@ int main (int argc, char *argv[]) { int i, c, ffc; -char *ppos, oline[256], oname[256]; +char *ppos, oname[256]; FILE *ifile, *ofile; if ((argc < 2) || (argv[0] == NULL)) { @@ -42,7 +42,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "ra"); if (ifile == NULL) { diff --git a/converters/sfmtcvt/sfmtcvt.c b/converters/sfmtcvt/sfmtcvt.c index d558d44..3d1f2bc 100644 --- a/converters/sfmtcvt/sfmtcvt.c +++ b/converters/sfmtcvt/sfmtcvt.c @@ -97,7 +97,7 @@ for (i = 1, numf = 0; i < argc; i++) { maxaddr[0], k, maxaddr[k]); return 0; } } strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".bin"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".bin"); else strcat (oname, ".bin"); ofile = fopen (oname, "wb"); if (ofile == NULL) { diff --git a/converters/strrem/strrem.c b/converters/strrem/strrem.c index 22b0996..a51aab8 100644 --- a/converters/strrem/strrem.c +++ b/converters/strrem/strrem.c @@ -44,7 +44,7 @@ if ((argc < 2) || (argv[0] == NULL)) { slen = strlen (srem); for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "r"); if (ifile == NULL) { diff --git a/converters/strsub/strsub.c b/converters/strsub/strsub.c index ff4503c..ea57f28 100644 --- a/converters/strsub/strsub.c +++ b/converters/strsub/strsub.c @@ -44,7 +44,7 @@ rmvlen = strlen (rmv); ins = argv[2]; for (i = 3; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".new"); else strcat (oname, ".new"); ifile = fopen (argv[i], "r"); if (ifile == NULL) { diff --git a/converters/tar2mt/tar2mt.c b/converters/tar2mt/tar2mt.c index 64be3e9..5bb62ec 100644 --- a/converters/tar2mt/tar2mt.c +++ b/converters/tar2mt/tar2mt.c @@ -29,7 +29,7 @@ #include #include -main (int argc, char **argv) +int main (int argc, char **argv) { FILE *fIn = NULL, *fOut = NULL; size_t blocksize = 8192, bytes_read; diff --git a/converters/tp512cvt/tp512cvt.c b/converters/tp512cvt/tp512cvt.c index cd5af60..da19219 100644 --- a/converters/tp512cvt/tp512cvt.c +++ b/converters/tp512cvt/tp512cvt.c @@ -44,7 +44,7 @@ if ((argc < 2) || (argv[0] == NULL)) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".tap"); else strcat (oname, ".tap"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/converters/tpc2mt/tpc2mt.c b/converters/tpc2mt/tpc2mt.c index 3c5896d..25a1213 100644 --- a/converters/tpc2mt/tpc2mt.c +++ b/converters/tpc2mt/tpc2mt.c @@ -46,7 +46,7 @@ if (argc < 2) { for (i = 1; i < argc; i++) { strcpy (oname, argv[i]); - if (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); + if ((ppos = strrchr (oname, '.'))) strcpy (ppos, ".tap"); else strcat (oname, ".tap"); ifile = fopen (argv[i], "rb"); if (ifile == NULL) { diff --git a/crossassemblers/hpasm/hpasm.c b/crossassemblers/hpasm/hpasm.c index 69828ca..0b01dec 100644 --- a/crossassemblers/hpasm/hpasm.c +++ b/crossassemblers/hpasm/hpasm.c @@ -35,21 +35,20 @@ int rep_count=0; /* >0 if REP statement in process */ char listfilename[256]; FILE *listfile; /****************************************************/ -start_listing (nam) +void start_listing (char *nam) /* ** Initialize listing output file */ -char *nam; { char *ppos; strncpy (listfilename, nam, 250); - if (ppos = strrchr (listfilename, '.')) strcpy (ppos, ".lst"); + if ((ppos = strrchr (listfilename, '.'))) strcpy (ppos, ".lst"); else strcat (listfilename, ".lst"); listfile = fopen (listfilename, "w"); } /****************************************************/ -finish_listing () { +void finish_listing (void) { /* ** Finish off listing output file */ @@ -67,23 +66,22 @@ long outcount; long outbufsize=27; long outbuf[27]; /****************************************************/ -start_output (nam) +void start_output (char *nam) /* ** Initialize binary output file */ -char *nam; { char *ppos; strncpy (outfilename, nam, 250); - if (ppos = strrchr (outfilename, '.')) strcpy (ppos, ".bin"); + if ((ppos = strrchr (outfilename, '.'))) strcpy (ppos, ".bin"); else strcat (outfilename, ".bin"); outfile = fopen (outfilename, "wb"); outaddr = 0; outcount = 0; } /****************************************************/ -send_output () { +void send_output (void) { /* ** Write block to binary output file */ @@ -104,24 +102,22 @@ send_output () { outcount = 0; } /****************************************************/ -output_word (addr,word) +void output_word (long address, long word) /* ** Write word to binary output file */ -long addr; -long word; { - if (outcount && (outaddr + outcount) != addr) { + if (outcount && (outaddr + outcount) != address) { send_output(); } - if (!outcount) outaddr = addr; + if (!outcount) outaddr = address; outbuf[outcount++] = word; if (outcount == outbufsize) { send_output(); } } /****************************************************/ -finish_output () { +void finish_output (void) { /* ** Finish current output block, write trailing leader, ** and close output file @@ -133,8 +129,7 @@ finish_output () { printf ("Output is in %s\n", outfilename); } /****************************************************/ -emit (code) -long code; +void emit (long code) { fprintf (listfile, " %05lo %06lo ", addr, code); if (!print_flag) { @@ -147,8 +142,7 @@ long code; addr++; } /****************************************************/ -err (text) -char *text; +void err (char *text) { if (!print_flag) { fprintf (listfile, " %12s %s\n", " ", line); @@ -221,7 +215,7 @@ long *value; *value=0; } /****************************************************/ -show_labels () +void show_labels (void) { long i; for (i=0; i MAXRLNT) { diff --git a/extracters/mtdump/mtdump.c b/extracters/mtdump/mtdump.c index 7941747..eace445 100644 --- a/extracters/mtdump/mtdump.c +++ b/extracters/mtdump/mtdump.c @@ -53,7 +53,7 @@ if ((argc < 2) || (argv[0] == NULL)) { printf ("Usage is: mtdump {-secf} file [file...]\n"); exit (0); } -s = argv[1]; +s = (unsigned char *)argv[1]; if ((s != NULL) && (*s++ == '-')) { ++argv; --argc; switch (*s) { diff --git a/extracters/ods2/direct.c b/extracters/ods2/direct.c index 888af89..3650633 100644 --- a/extracters/ods2/direct.c +++ b/extracters/ods2/direct.c @@ -128,12 +128,15 @@ int namematch(char *spec,int speclen,char *entry,int entrylen) if (entrylen < count) count = entrylen; do { register char sch = *spc,ech = *ent; - if (sch != ech) if (toupper(sch) != toupper(ech)) - if (sch == '%') { - percent = 1; - } else { - break; + if (sch != ech) { + if (toupper(sch) != toupper(ech)) { + if (sch == '%') { + percent = 1; + } else { + break; + } } + } spc++; ent++; } while (--count > 0); diff --git a/extracters/rawcopy/RawCopy.c b/extracters/rawcopy/RawCopy.c index 75636e2..1d056c9 100644 --- a/extracters/rawcopy/RawCopy.c +++ b/extracters/rawcopy/RawCopy.c @@ -40,10 +40,10 @@ while (0 != (bytesread = fread(buf, 1, readsize, fin))) else totalbytes += bytesread; if (0 == (totalbytes%(1024*1024))) - fprintf(stderr, "%6dMB Copied...\r", totalbytes/(1024*1024)); + fprintf(stderr, "%6zuMB Copied...\r", totalbytes/(1024*1024)); } fprintf(stderr, "\n"); -fprintf(stderr, "Total Data: %6.2f MBytes (%d bytes)\n", totalbytes/(1024.0*1024.0), totalbytes); +fprintf(stderr, "Total Data: %6.2f MBytes (%zu bytes)\n", totalbytes/(1024.0*1024.0), totalbytes); fclose(fin); fclose(fout); exit(0); diff --git a/extracters/rstsflx/diskio.c b/extracters/rstsflx/diskio.c index 6bdd274..3b16cc4 100644 --- a/extracters/rstsflx/diskio.c +++ b/extracters/rstsflx/diskio.c @@ -156,7 +156,7 @@ long adjsize (long tsize) return tsize; } -void setrname () +void setrname (void) { long t1; int t2; @@ -288,7 +288,7 @@ void rwrite (long block, long size, void *buffer) nextblk = block + size / BLKSIZE; } -void rclose () +void rclose (void) { if (absflag) absclose (); else fclose (rstsfile); diff --git a/extracters/rstsflx/doalloc.c b/extracters/rstsflx/doalloc.c index eabbe78..2b076c3 100644 --- a/extracters/rstsflx/doalloc.c +++ b/extracters/rstsflx/doalloc.c @@ -10,6 +10,7 @@ void doalloc (int argc, char **argv) /* show allocated clusters */ { + (void)argc; (void)argv; /* unused parameters */ byte *s; int bit, szb; long first, used, unused, biggest, size; diff --git a/extracters/rstsflx/docomp.c b/extracters/rstsflx/docomp.c index 362c4f5..b69495c 100644 --- a/extracters/rstsflx/docomp.c +++ b/extracters/rstsflx/docomp.c @@ -11,6 +11,7 @@ void docomp (int argc, char **argv) /* zero unused clusters */ { + (void)argc; (void)argv; /* unused parameters */ byte *s; int bit, szb; long first, size, iosize; diff --git a/extracters/rstsflx/dohook.c b/extracters/rstsflx/dohook.c index 2a248fe..bd7f02d 100644 --- a/extracters/rstsflx/dohook.c +++ b/extracters/rstsflx/dohook.c @@ -148,7 +148,7 @@ void *getdata (firqb *f, long address) return (iobuf + (address % BLKSIZE)); } -void cleanup () +void cleanup (void) { rumountrw (); if (ovr != NULL) free (ovr); diff --git a/extracters/rstsflx/doident.c b/extracters/rstsflx/doident.c index 2038425..9982aa7 100644 --- a/extracters/rstsflx/doident.c +++ b/extracters/rstsflx/doident.c @@ -10,6 +10,7 @@ void doident (int argc, char **argv) /* show pack id data */ { + (void)argc; (void)argv; /* unused parameters */ packlabel *p; char rdate[DATELEN]; char rtime[RTIMELEN]; diff --git a/extracters/rstsflx/doinit.c b/extracters/rstsflx/doinit.c index e006b40..fc6b255 100644 --- a/extracters/rstsflx/doinit.c +++ b/extracters/rstsflx/doinit.c @@ -19,7 +19,7 @@ #define UFDCLU 16 #define DEC166COUNT 10 /* number of bad block tables */ -int getclusize () +int getclusize (void) { int newclu; char *p; diff --git a/extracters/rstsflx/rstsflx.c b/extracters/rstsflx/rstsflx.c index 9b46234..cda36f9 100644 --- a/extracters/rstsflx/rstsflx.c +++ b/extracters/rstsflx/rstsflx.c @@ -83,7 +83,6 @@ void doabort(int status, const char *srcfile, int srcline) int main (int argc, char **argv) { - int cmdlen; char **cmdargv = NULL; /* for scanning command line */ int cmdargc; char *word; diff --git a/extracters/rstsflx/rtime.c b/extracters/rstsflx/rtime.c index c438afa..76de38b 100644 --- a/extracters/rstsflx/rtime.c +++ b/extracters/rstsflx/rtime.c @@ -55,7 +55,7 @@ char *cvttime (word time, char *buf) return (buf + RTIMELEN - 1); /* point to terminator */ } -word curdate () /* current date in rsts form */ +word curdate (void) /* current date in rsts form */ { struct tm *tmb; time_t now; @@ -65,7 +65,7 @@ word curdate () /* current date in rsts form */ return ((tmb->tm_year - 70) * 1000 + tmb->tm_yday + 1); } -word curtime () /* current time in rsts form */ +word curtime (void) /* current time in rsts form */ { struct tm *tmb; time_t now; diff --git a/extracters/rstsflx/scancmd.c b/extracters/rstsflx/scancmd.c index f4f689c..376c869 100644 --- a/extracters/rstsflx/scancmd.c +++ b/extracters/rstsflx/scancmd.c @@ -219,7 +219,7 @@ void dodisk (int argc, char **argv) void doexit (int argc, char **argv) { - int i; + (void)argc; (void)argv; /* unused parameters */ #ifndef __APPLE__ i = append_history (newhistitems, histfile); @@ -496,6 +496,7 @@ void initialize_readline (void) */ char ** flx_completion (char *text, int start, int end) { + (void)end; /* unused parameter */ char **matches; matches = NULL; diff --git a/extracters/rstsflx/unxabsio.c b/extracters/rstsflx/unxabsio.c index 652895a..473e71d 100644 --- a/extracters/rstsflx/unxabsio.c +++ b/extracters/rstsflx/unxabsio.c @@ -81,12 +81,13 @@ int absopen (const char *rname, const char *mode) void absseek (long block) { + (void)block; /* unused parameter */ rabort(INTERNAL); /* should never get here */ } /* This routine is called to do any needed "close" actions for absolute I/O */ -void absclose () +void absclose (void) { rabort(INTERNAL); /* should never get here */ } @@ -99,6 +100,7 @@ void absclose () long absread (long sec, long count, void *buffer) { + (void)sec; (void)count; (void)buffer; /* unused parameters */ return (0); /* should never get here */ } @@ -106,5 +108,6 @@ long absread (long sec, long count, void *buffer) long abswrite (long sec, long count, void *buffer) { + (void)sec; (void)count; (void)buffer; /* unused parameters */ return (0); /* should never get here */ } diff --git a/extracters/tpdump/tpdump.c b/extracters/tpdump/tpdump.c index 97cf055..ffdcc69 100644 --- a/extracters/tpdump/tpdump.c +++ b/extracters/tpdump/tpdump.c @@ -173,7 +173,7 @@ int main ( int argc, char* argv[] ) if ( (recsiz & 1) && even ) fread ( pr, 1, 1, fi ); recsiz2 = read_len ( fi ); if ( recsiz2 != recsiz ) - { printf("Unequal starting and ending record sizes: %d != %d\n", + { printf("Unequal starting and ending record sizes: %zu != %zu\n", recsiz, recsiz2); return(4); }