]> granicus.if.org Git - flex/commitdiff
Remove unused argument and variable from src/scanopt.c:scanopt_err
authorMariusz Pluciński <mplucinski@mplucinski.com>
Fri, 25 Jul 2014 15:04:57 +0000 (17:04 +0200)
committerWill Estes <westes575@gmail.com>
Mon, 24 Nov 2014 01:29:49 +0000 (20:29 -0500)
src/scanopt.c

index 6d8d481f7eb88b47f187101642ba1f3cb87c2a62..10c372a32eb5e8b1a487cd8f469a7f5058f3393b 100644 (file)
@@ -82,7 +82,7 @@ static int PRINTLEN PROTO ((struct _scanopt_t *, int));
 static int RVAL PROTO ((struct _scanopt_t *, int));
 static int FLAGS PROTO ((struct _scanopt_t *, int));
 static const char *DESC PROTO ((struct _scanopt_t *, int));
-static int scanopt_err PROTO ((struct _scanopt_t *, int, int, int));
+static int scanopt_err PROTO ((struct _scanopt_t *, int, int));
 static int matchlongopt PROTO ((char *, char **, int *, char **, int *));
 static int find_opt
 PROTO ((struct _scanopt_t *, int, char *, int, int *, int *opt_offset));
@@ -529,9 +529,8 @@ int     scanopt_usage (scanner, fp, usage)
 #endif /* no scanopt_usage */
 
 
-static int scanopt_err (s, opt_offset, is_short, err)
+static int scanopt_err (s, is_short, err)
      struct _scanopt_t *s;
-     int     opt_offset;
      int     is_short;
      int     err;
 {
@@ -745,7 +744,7 @@ int     scanopt (svoid, arg, optindex)
                        if (!find_opt
                            (s, 1, optname, namelen, &errcode,
                             &opt_offset)) {
-                               scanopt_err (s, opt_offset, 0, errcode);
+                               scanopt_err (s, 0, errcode);
                                return errcode;
                        }
                        /* We handle this below. */
@@ -780,7 +779,7 @@ int     scanopt (svoid, arg, optindex)
 
                if (!find_opt
                    (s, 0, pstart, namelen, &errcode, &opt_offset)) {
-                       return scanopt_err (s, opt_offset, 1, errcode);
+                       return scanopt_err (s, 1, errcode);
                }
 
                optarg = pstart + 1;
@@ -808,8 +807,7 @@ int     scanopt (svoid, arg, optindex)
        /* case: no args allowed */
        if (auxp->flags & ARG_NONE) {
                if (optarg && !is_short) {
-                       scanopt_err (s, opt_offset, is_short, errcode =
-                                    SCANOPT_ERR_ARG_NOT_ALLOWED);
+                       scanopt_err (s, is_short, errcode = SCANOPT_ERR_ARG_NOT_ALLOWED);
                        INC_INDEX (s, 1);
                        return errcode;
                }
@@ -823,8 +821,7 @@ int     scanopt (svoid, arg, optindex)
        /* case: required */
        if (auxp->flags & ARG_REQ) {
                if (!optarg && !has_next)
-                       return scanopt_err (s, opt_offset, is_short,
-                                           SCANOPT_ERR_ARG_NOT_FOUND);
+                       return scanopt_err (s, is_short, SCANOPT_ERR_ARG_NOT_FOUND);
 
                if (!optarg) {
                        /* Let the next argv element become the argument. */