From 82cbbc338a35bb5a66efe8ba4e1f5430cd89f7f2 Mon Sep 17 00:00:00 2001 From: gibbs Date: Mon, 16 Aug 1999 22:42:33 +0000 Subject: [PATCH] Fix a few compiler nits. Submitted by: Bill Fumerola --- sys/dev/aic7xxx/aicasm.c | 11 +++++++---- sys/dev/aic7xxx/aicasm/aicasm.c | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sys/dev/aic7xxx/aicasm.c b/sys/dev/aic7xxx/aicasm.c index 9f904ad85f61..f6a1a191e316 100644 --- a/sys/dev/aic7xxx/aicasm.c +++ b/sys/dev/aic7xxx/aicasm.c @@ -25,11 +25,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aicasm.c,v 1.20 1998/09/15 07:24:17 gibbs Exp $ + * $Id: aicasm.c,v 1.21 1999/03/23 07:24:29 gibbs Exp $ */ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ static void usage(void); static void back_patch(void); static void output_code(FILE *ofile); static void output_listing(FILE *listfile, char *ifilename); -static int dump_scope(scope_t *scope); +static void dump_scope(scope_t *scope); static void emit_patch(scope_t *scope, int patch); static int check_patch(patch_t **start_patch, int start_instr, int *skip_addr, int *func_vals); @@ -361,11 +362,10 @@ struct patch { fprintf(stderr, "%s: %d instructions used\n", appname, instrcount); } -static int +static void dump_scope(scope_t *scope) { scope_t *cur_scope; - int patches_emitted = 0; /* * Emit the first patch for this scope @@ -710,6 +710,9 @@ process_scope(scope_t *scope) skip_instr_count += cur_scope->end_addr - cur_scope->begin_addr; break; + case SCOPE_ROOT: + stop("Unexpected scope type encountered", EX_SOFTWARE); + /* NOTREACHED */ } cur_scope = TAILQ_PREV(cur_scope, scope_tailq, scope_links); diff --git a/sys/dev/aic7xxx/aicasm/aicasm.c b/sys/dev/aic7xxx/aicasm/aicasm.c index 9f904ad85f61..f6a1a191e316 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm.c +++ b/sys/dev/aic7xxx/aicasm/aicasm.c @@ -25,11 +25,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aicasm.c,v 1.20 1998/09/15 07:24:17 gibbs Exp $ + * $Id: aicasm.c,v 1.21 1999/03/23 07:24:29 gibbs Exp $ */ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ static void usage(void); static void back_patch(void); static void output_code(FILE *ofile); static void output_listing(FILE *listfile, char *ifilename); -static int dump_scope(scope_t *scope); +static void dump_scope(scope_t *scope); static void emit_patch(scope_t *scope, int patch); static int check_patch(patch_t **start_patch, int start_instr, int *skip_addr, int *func_vals); @@ -361,11 +362,10 @@ struct patch { fprintf(stderr, "%s: %d instructions used\n", appname, instrcount); } -static int +static void dump_scope(scope_t *scope) { scope_t *cur_scope; - int patches_emitted = 0; /* * Emit the first patch for this scope @@ -710,6 +710,9 @@ process_scope(scope_t *scope) skip_instr_count += cur_scope->end_addr - cur_scope->begin_addr; break; + case SCOPE_ROOT: + stop("Unexpected scope type encountered", EX_SOFTWARE); + /* NOTREACHED */ } cur_scope = TAILQ_PREV(cur_scope, scope_tailq, scope_links);