From: Sascha Wildner Date: Fri, 19 Sep 2008 17:49:31 +0000 (+0000) Subject: Remove dereference of 'i' which is never set. getopt() will take care of X-Git-Url: https://gitweb.dragonflybsd.org/~lentferj/dragonfly.git/commitdiff_plain/2d7f24f17660e094af16d28bc956459c0020a2cf Remove dereference of 'i' which is never set. getopt() will take care of printing an "illegal option" message anyway. Found-by: LLVM/Clang Static Analyzer --- diff --git a/usr.sbin/asf/asf.c b/usr.sbin/asf/asf.c index c82c903fa8..424084696c 100644 --- a/usr.sbin/asf/asf.c +++ b/usr.sbin/asf/asf.c @@ -25,7 +25,7 @@ */ /* $Id: asf.c,v 1.6 2003/11/04 06:38:37 green Exp $ */ /* $FreeBSD: src/usr.sbin/asf/asf.c,v 1.6 2003/11/04 06:38:37 green Exp $ */ -/* $DragonFly: src/usr.sbin/asf/asf.c,v 1.7 2008/09/02 11:50:46 matthias Exp $ */ +/* $DragonFly: src/usr.sbin/asf/asf.c,v 1.8 2008/09/19 17:49:31 swildner Exp $ */ #define MAXLINE 1024 #include @@ -180,7 +180,7 @@ main(int argc, char *argv[]) FILE *out; /* output file */ char ocbuf[MAXLINE]; int tokens; /* number of tokens on line */ - int i, ch; + int ch; const char *filemode = "w"; /* mode for outfile */ char cwd[MAXPATHLEN]; /* current directory */ char *token[MAXTOKEN]; @@ -203,9 +203,6 @@ main(int argc, char *argv[]) dofind = 1; break; default: - fprintf(stderr, - "Invalid option: %s, aborting\n", - argv[i]); usage(argv[0]); return 1; }