From 024f1e89163d8fcddaf5f40b9d7ddc1fa754b82c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 2 Jan 1997 05:23:15 +0000 Subject: [PATCH] Eliminate compiler warnings generated under NT. --- v7/src/microcode/avltree.c | 6 ++++-- v7/src/microcode/bchdrn.h | 6 ++++-- v7/src/microcode/bchpur.c | 5 +++-- v7/src/microcode/bignum.c | 10 ++++++++-- v7/src/microcode/bintopsb.c | 9 +++++---- v7/src/microcode/bitstr.c | 10 +++++++--- v7/src/microcode/comutl.c | 5 +++-- v7/src/microcode/extern.c | 10 ++++++---- v7/src/microcode/fasdump.c | 6 ++++-- v7/src/microcode/findprim.c | 11 ++++++----- v7/src/microcode/hooks.c | 8 ++++++-- v7/src/microcode/lookprm.c | 7 +++++-- v7/src/microcode/ntio.c | 4 ++-- v7/src/microcode/ntsys.c | 6 +++--- v7/src/microcode/nttrap.c | 6 ++++-- v7/src/microcode/rgxprim.c | 8 ++++++-- v7/src/microcode/utils.c | 5 +++-- 17 files changed, 79 insertions(+), 43 deletions(-) diff --git a/v7/src/microcode/avltree.c b/v7/src/microcode/avltree.c index 9890ca02f..2151bda1b 100644 --- a/v7/src/microcode/avltree.c +++ b/v7/src/microcode/avltree.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: avltree.c,v 1.2 1996/10/02 18:56:52 cph Exp $ +$Id: avltree.c,v 1.3 1997/01/02 05:21:28 cph Exp $ -Copyright (c) 1993-96 Massachusetts Institute of Technology +Copyright (c) 1993-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -189,6 +189,8 @@ DEFUN (tree_insert, (tree, name, value), return (rebalance_rite (tree)); } } + /*NOTREACHED*/ + return (0); } tree_node diff --git a/v7/src/microcode/bchdrn.h b/v7/src/microcode/bchdrn.h index 5085a9c8f..7ceab5741 100644 --- a/v7/src/microcode/bchdrn.h +++ b/v7/src/microcode/bchdrn.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bchdrn.h,v 1.7 1995/03/21 22:12:41 cph Exp $ +$Id: bchdrn.h,v 1.8 1997/01/02 05:21:28 cph Exp $ -Copyright (c) 1991-95 Massachusetts Institute of Technology +Copyright (c) 1991-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -47,11 +47,13 @@ MIT in each case. */ #else #ifndef DOS386 #ifndef _OS2 +#ifndef WINNT extern int EXFUN (read, (int, PTR, unsigned int)); extern int EXFUN (write, (int, PTR, unsigned int)); #endif #endif #endif +#endif #if defined(HAVE_POSIX_SIGNALS) && defined(HAVE_BSD_SIGNALS) # define RE_INSTALL_HANDLER(signum,handler) do { } while (0) diff --git a/v7/src/microcode/bchpur.c b/v7/src/microcode/bchpur.c index e2d45b9e8..300d5a6e3 100644 --- a/v7/src/microcode/bchpur.c +++ b/v7/src/microcode/bchpur.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bchpur.c,v 9.65 1994/01/30 03:32:04 gjr Exp $ +$Id: bchpur.c,v 9.66 1997/01/02 05:21:29 cph Exp $ -Copyright (c) 1987-1994 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -674,4 +674,5 @@ DEFINE_PRIMITIVE ("PRIMITIVE-PURIFY", Prim_primitive_purify, 3, 3, 0) Pushed (); PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + return (0); } diff --git a/v7/src/microcode/bignum.c b/v7/src/microcode/bignum.c index 207a373a0..3b16c106f 100644 --- a/v7/src/microcode/bignum.c +++ b/v7/src/microcode/bignum.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bignum.c,v 9.42 1996/10/02 18:56:56 cph Exp $ +$Id: bignum.c,v 9.43 1997/01/02 05:21:30 cph Exp $ -Copyright (c) 1989-96 Massachusetts Institute of Technology +Copyright (c) 1989-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -399,6 +399,9 @@ DEFUN (bignum_quotient, (numerator, denominator), q_negative_p, 0); return (quotient); } + default: + /*NOTREACHED*/ + return (0); } } } @@ -441,6 +444,9 @@ DEFUN (bignum_remainder, (numerator, denominator), 0, (BIGNUM_NEGATIVE_P (numerator))); return (remainder); } + default: + /*NOTREACHED*/ + return (0); } } diff --git a/v7/src/microcode/bintopsb.c b/v7/src/microcode/bintopsb.c index fc9563ed1..9c6529e99 100644 --- a/v7/src/microcode/bintopsb.c +++ b/v7/src/microcode/bintopsb.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bintopsb.c,v 9.65 1994/01/12 00:30:20 gjr Exp $ +$Id: bintopsb.c,v 9.66 1997/01/02 05:23:15 cph Exp $ -Copyright (c) 1987-1994 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -446,7 +446,8 @@ DEFUN (bignum_length, (bignum), SCHEME_OBJECT bignum) fprintf (stderr, "%s: Bignum exceeds representable length.\n", program_name); quit (1); - /* NOTREACHED */ + /*NOTREACHED*/ + return (0); } static void @@ -1926,7 +1927,7 @@ DEFUN_VOID (do_it) "%s: Input is not a Scheme binary file.\n", program_name); quit (1); - /* NOTREACHED */ + /*NOTREACHED*/ } if ( (Version > FASL_FORMAT_VERSION) diff --git a/v7/src/microcode/bitstr.c b/v7/src/microcode/bitstr.c index 0ff6f230c..6ba4fe615 100644 --- a/v7/src/microcode/bitstr.c +++ b/v7/src/microcode/bitstr.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bitstr.c,v 9.59 1996/10/02 21:16:23 cph Exp $ +$Id: bitstr.c,v 9.60 1997/01/02 05:21:31 cph Exp $ -Copyright (c) 1987-96 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -631,6 +631,9 @@ DEFUN (bignum_to_bit_string, (length, bignum), (bignum, (1L << CHAR_BIT), btbs_consumer, (&result_ptr)); return (result); } + default: + /*NOTREACHED*/ + return (0); } } @@ -702,7 +705,8 @@ error is signalled.") if (BIGNUM_P (object)) PRIMITIVE_RETURN (bignum_to_bit_string (length, object)); error_wrong_type_arg (2); - /* NOTREACHED */ + /*NOTREACHED*/ + return (0); } /* */ diff --git a/v7/src/microcode/comutl.c b/v7/src/microcode/comutl.c index bfc89309b..cace20504 100644 --- a/v7/src/microcode/comutl.c +++ b/v7/src/microcode/comutl.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: comutl.c,v 1.29 1993/10/30 03:04:19 gjr Exp $ +$Id: comutl.c,v 1.30 1997/01/02 05:21:33 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -120,6 +120,7 @@ DEFINE_PRIMITIVE ("COERCE-TO-COMPILED-PROCEDURE", Prim_coerce_to_closure, 2, 2, default: error_bad_range_arg (2); /*NOTREACHED*/ + return (0); } } diff --git a/v7/src/microcode/extern.c b/v7/src/microcode/extern.c index 2bbebe1ae..22b925350 100644 --- a/v7/src/microcode/extern.c +++ b/v7/src/microcode/extern.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: extern.c,v 9.35 1996/10/02 18:57:24 cph Exp $ +$Id: extern.c,v 9.36 1997/01/02 05:21:33 cph Exp $ -Copyright (c) 1987-96 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -67,7 +67,8 @@ number (i.e. external representation) of the desired result.") default: error_bad_range_arg (1); } - /* NOTREACHED */ + /*NOTREACHED*/ + return (0); } DEFINE_PRIMITIVE ("MAP-MACHINE-ADDRESS-TO-CODE", Prim_map_address_to_code, 2, 2, @@ -99,7 +100,8 @@ the internal address.") default: error_bad_range_arg (1); } - /* NOTREACHED */ + /*NOTREACHED*/ + return (0); } DEFINE_PRIMITIVE ("PRIMITIVE-PROCEDURE-ARITY", Prim_primitive_procedure_arity, 1, 1, diff --git a/v7/src/microcode/fasdump.c b/v7/src/microcode/fasdump.c index 9fe93d533..e75a848ee 100644 --- a/v7/src/microcode/fasdump.c +++ b/v7/src/microcode/fasdump.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: fasdump.c,v 9.61 1996/10/02 18:57:28 cph Exp $ +$Id: fasdump.c,v 9.62 1997/01/02 05:21:34 cph Exp $ -Copyright (c) 1987-96 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -416,6 +416,7 @@ DEFUN (Fasdump_Exit, (code, close_p), long code AND Boolean close_p) { signal_error_from_primitive (ERR_IO_ERROR); /*NOTREACHED*/ + return (0); } if (code == PRIM_DONE) return (SHARP_T); @@ -425,6 +426,7 @@ DEFUN (Fasdump_Exit, (code, close_p), long code AND Boolean close_p) { signal_error_from_primitive (code); /*NOTREACHED*/ + return (0); } } diff --git a/v7/src/microcode/findprim.c b/v7/src/microcode/findprim.c index 3c259037c..0ca0266e0 100644 --- a/v7/src/microcode/findprim.c +++ b/v7/src/microcode/findprim.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: findprim.c,v 9.50 1996/10/02 18:57:35 cph Exp $ +$Id: findprim.c,v 9.51 1997/01/02 05:21:35 cph Exp $ -Copyright (c) 1987-96 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -102,6 +102,7 @@ typedef int boolean; /* The 4.2 bsd vax compiler has a bug which forces the following. */ #define pseudo_void int +#define pseudo_return return (0) extern void EXFUN (exit, (int)); @@ -1046,7 +1047,7 @@ DEFUN_VOID (create_normal_entry) COPY_FILE_NAME ((* data_buffer) [buffer_index]); (result_buffer [buffer_index]) = (& ((* data_buffer) [buffer_index])); buffer_index += 1; - return; + pseudo_return; } pseudo_void @@ -1062,7 +1063,7 @@ DEFUN_VOID (create_alternate_entry) COPY_FILE_NAME ((* data_buffer) [buffer_index]); (result_buffer [buffer_index]) = (& ((* data_buffer) [buffer_index])); buffer_index += 1; - return; + pseudo_return; } pseudo_void @@ -1108,7 +1109,7 @@ DEFUN_VOID (create_builtin_entry) } ((* data_buffer) [index]) = desc; (result_buffer [index]) = (& ((* data_buffer) [index])); - return; + pseudo_return; } int diff --git a/v7/src/microcode/hooks.c b/v7/src/microcode/hooks.c index 5f6845d7e..c5b1c5569 100644 --- a/v7/src/microcode/hooks.c +++ b/v7/src/microcode/hooks.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: hooks.c,v 9.55 1996/10/02 19:17:34 cph Exp $ +$Id: hooks.c,v 9.56 1997/01/02 05:21:37 cph Exp $ -Copyright (c) 1988-96 Massachusetts Institute of Technology +Copyright (c) 1988-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -154,6 +154,7 @@ Invoke PROCEDURE on the arguments contained in list-of-ARGS.") PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + return (0); } /* CALL-WITH-CURRENT-CONTINUATION @@ -494,6 +495,7 @@ memoized yet.") Store_Expression (FAST_MEMORY_REF (thunk, THUNK_PROCEDURE)); PRIMITIVE_ABORT (PRIM_DO_EXPRESSION); /*NOTREACHED*/ + return (0); } } } @@ -797,6 +799,7 @@ and MARKER2 is data identifying the marker instance.") Pushed (); PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + return (0); } } @@ -833,6 +836,7 @@ DEFUN (with_new_interrupt_mask, (new_mask), unsigned long new_mask) SET_INTERRUPT_MASK (new_mask); PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + return (0); } } diff --git a/v7/src/microcode/lookprm.c b/v7/src/microcode/lookprm.c index c292c86d3..1c15c9de6 100644 --- a/v7/src/microcode/lookprm.c +++ b/v7/src/microcode/lookprm.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: lookprm.c,v 1.9 1993/06/24 07:08:56 gjr Exp $ +$Id: lookprm.c,v 1.10 1997/01/02 05:21:38 cph Exp $ -Copyright (c) 1988-1992 Massachusetts Institute of Technology +Copyright (c) 1988-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -210,6 +210,7 @@ DEFINE_PRIMITIVE ("LEXICAL-UNREFERENCEABLE?", Prim_unreferenceable_test, 2, 2, 0 signal_error_from_primitive(Result); } /*NOTREACHED*/ + return (0); } SCHEME_OBJECT @@ -427,4 +428,6 @@ DEFINE_PRIMITIVE ("ENVIRONMENT-LINK-NAME", Prim_environment_link_name, 3, 3, 0) MEMORY_STORE (cell[0], MAKE_POINTER_OBJECT (TC_REFERENCE_TRAP, trap)); PRIMITIVE_RETURN(SHARP_T); } + /*NOTREACHED*/ + return (0); } diff --git a/v7/src/microcode/ntio.c b/v7/src/microcode/ntio.c index acf18037c..f596f05d4 100644 --- a/v7/src/microcode/ntio.c +++ b/v7/src/microcode/ntio.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntio.c,v 1.13 1997/01/01 22:57:27 cph Exp $ +$Id: ntio.c,v 1.14 1997/01/02 05:21:38 cph Exp $ Copyright (c) 1992-97 Massachusetts Institute of Technology @@ -248,7 +248,7 @@ DEFUN (raw_write, (fd, buffer, nbytes), return (nbytes); } if (IsConsoleHandle (fd)) - return (nt_console_write (buffer, nbytes)); + return (nt_console_write (((void *) buffer), nbytes)); if (WriteFile (fd, buffer, nbytes, &bytesWritten, 0)) return (bytesWritten); else diff --git a/v7/src/microcode/ntsys.c b/v7/src/microcode/ntsys.c index 1c9213576..4b1e45a82 100644 --- a/v7/src/microcode/ntsys.c +++ b/v7/src/microcode/ntsys.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntsys.c,v 1.6 1996/10/02 18:58:21 cph Exp $ +$Id: ntsys.c,v 1.7 1997/01/02 05:21:39 cph Exp $ -Copyright (c) 1992-96 Massachusetts Institute of Technology +Copyright (c) 1992-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -51,7 +51,7 @@ nt_console_write (void * vbuffer, size_t nsize) BOOL nt_pathname_as_filename (char * name, char * buffer) { /* Returns whether directory encountered is top level */ - unsigned int end_index = ((strlen (name)) - 1); + int end_index = ((strlen (name)) - 1); /* The runtime system comes down with a name that has a back slash at the end. This will choke DOS. diff --git a/v7/src/microcode/nttrap.c b/v7/src/microcode/nttrap.c index b635bb3e3..9fe3deeaa 100644 --- a/v7/src/microcode/nttrap.c +++ b/v7/src/microcode/nttrap.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: nttrap.c,v 1.11 1995/10/24 05:07:05 cph Exp $ +$Id: nttrap.c,v 1.12 1997/01/02 05:21:40 cph Exp $ -Copyright (c) 1992-95 Massachusetts Institute of Technology +Copyright (c) 1992-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1295,6 +1295,8 @@ DEFUN (WinntException, (code, info), info->ContextRecord, MB_OK); trap_immediate_termination (); + /*NOTREACHED*/ + return (0); } else if (code == EXCEPTION_CODE_GUARDED_PAGE_ACCESS) { diff --git a/v7/src/microcode/rgxprim.c b/v7/src/microcode/rgxprim.c index 8db09b559..4b05c28b4 100644 --- a/v7/src/microcode/rgxprim.c +++ b/v7/src/microcode/rgxprim.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: rgxprim.c,v 1.10 1993/06/24 07:09:41 gjr Exp $ +$Id: rgxprim.c,v 1.11 1997/01/02 05:21:41 cph Exp $ -Copyright (c) 1987-91 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -90,6 +90,8 @@ MIT in each case. */ error_bad_range_arg (1); \ else \ error_external_return (); \ + /*NOTREACHED*/ \ + return (0); \ } while (0) DEFINE_PRIMITIVE ("RE-CHAR-SET-ADJOIN!", Prim_re_char_set_adjoin, 2, 2, 0) @@ -126,6 +128,8 @@ DEFINE_PRIMITIVE ("RE-COMPILE-FASTMAP", Prim_re_compile_fastmap, 4, 4, 0) error_bad_range_arg (1); else error_external_return (); + /*NOTREACHED*/ + return (0); } /* (re-match-substring regexp translation syntax-table registers diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index 6fbc8d141..29c3dd3fb 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: utils.c,v 9.70 1996/10/02 18:59:03 cph Exp $ +$Id: utils.c,v 9.71 1997/01/02 05:21:41 cph Exp $ -Copyright (c) 1987-96 Massachusetts Institute of Technology +Copyright (c) 1987-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -817,6 +817,7 @@ DEFUN (Restore_History, (hist_obj), SCHEME_OBJECT hist_obj) outf_fatal ("\nBad history to restore.\n"); Microcode_Termination (TERM_EXIT); /*NOTREACHED*/ + return (0); } else { -- 2.25.1