From 33953bab9f5deb4e097c2735c6de3e069ac4351f Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 26 Jun 2014 12:53:36 +0000 Subject: [PATCH] Fix warnings (Xin Li) --- src/apprentice.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apprentice.c b/src/apprentice.c index 30931f89..d3c45f70 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.210 2014/05/14 23:15:42 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.211 2014/06/03 19:01:34 christos Exp $") #endif /* lint */ #include "magic.h" @@ -416,9 +416,11 @@ add_mlist(struct mlist *mlp, struct magic_map *map, size_t idx) private int apprentice_1(struct magic_set *ms, const char *fn, int action) { - struct mlist *ml; struct magic_map *map; +#ifndef COMPILE_ONLY + struct mlist *ml; size_t i; +#endif if (magicsize != FILE_MAGICSIZE) { file_error(ms, 0, "magic element size %lu != %lu", @@ -460,9 +462,8 @@ apprentice_1(struct magic_set *ms, const char *fn, int action) apprentice_list(ms->mlist[i], TEXTTEST); } } - - return 0; #endif /* COMPILE_ONLY */ + return 0; } protected void -- 2.50.0