GNU bug report logs - #33218
Updated dfa.c: unused function charclass_context

Previous Next

Package: grep;

Reported by: Arnold Robbins <arnold <at> skeeve.com>

Date: Wed, 31 Oct 2018 19:54:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arnold Robbins <arnold <at> skeeve.com>
To: 33218 <at> debbugs.gnu.org
Subject: bug#33218: Updated dfa.c: unused function charclass_context
Date: Wed, 31 Oct 2018 21:53:29 +0200
Hi.

I have merged the latest dfa.c into gawk.  When I compile it, I get the
following warning:

dfa.c:2352:1: warning: 'charclass_context' defined but not used [-Wunused-function]

And indeed, the function isn't used. So I have removed it.

Thanks,

Arnold
----------------------
diff --git a/support/dfa.c b/support/dfa.c
index 71c350e..0f0a661 100644
--- a/support/dfa.c
+++ b/support/dfa.c
@@ -2345,27 +2345,6 @@ epsclosure (struct dfa const *d)
   free (tmp.elems);
 }
 
-/* Returns the set of contexts for which there is at least one
-   character included in C.  */
-
-static int
-charclass_context (struct dfa const *dfa, charclass const *c)
-{
-  int context = 0;
-
-  for (unsigned int j = 0; j < CHARCLASS_WORDS; ++j)
-    {
-      if (c->w[j] & dfa->syntax.newline.w[j])
-        context |= CTX_NEWLINE;
-      if (c->w[j] & dfa->syntax.letters.w[j])
-        context |= CTX_LETTER;
-      if (c->w[j] & ~(dfa->syntax.letters.w[j] | dfa->syntax.newline.w[j]))
-        context |= CTX_NONE;
-    }
-
-  return context;
-}
-
 /* Returns the contexts on which the position set S depends.  Each context
    in the set of returned contexts (let's call it SC) may have a different
    follow set than other contexts in SC, and also different from the




This bug report was last modified 5 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.