Skip to content

Commit

Permalink
parsers: Suppress warnings when configured with --enable-debugging
Browse files Browse the repository at this point in the history
Suppress unused function warnings.

Close #2286
  • Loading branch information
k-takata committed Nov 4, 2019
1 parent 0b17c8a commit 2cf5f15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions parsers/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ static int Lang_html;
static void readTag (tokenInfo *token, vString *text, int depth);

#ifdef DEBUG
#if 0
static void dumpToken (tokenInfo *token, const char *context, const char* extra_context)
{
fprintf (stderr, "[%7s] %-20s@%s.%s\n",
tokenTypes[token->type], vStringValue(token->string),
context, extra_context? extra_context: "_");
}
#endif
#endif

static void readTokenText (tokenInfo *const token, bool collectText)
{
Expand Down
8 changes: 6 additions & 2 deletions parsers/jscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ static bool parseLine (tokenInfo *const token, bool is_inside_class);
static void parseUI5 (tokenInfo *const token);

#ifdef DO_TRACING
static void dumpToken (const tokenInfo *const token);
//static void dumpToken (const tokenInfo *const token);
static const char *tokenTypeName(enum eTokenType e);
static const char *keywordName(enum eKeywordId e);
//static const char *keywordName(enum eKeywordId e);
#endif

static void *newPoolToken (void *createArg CTAGS_ATTR_UNUSED)
Expand Down Expand Up @@ -2614,6 +2614,7 @@ static void parseJsFile (tokenInfo *const token)
}

#ifdef DO_TRACING
#if 0
static void dumpToken (const tokenInfo *const token)
{
fprintf(stderr, "Token <%p>: %s: %s\n",
Expand All @@ -2623,6 +2624,7 @@ static void dumpToken (const tokenInfo *const token)
token->type == TOKEN_IDENTIFIER? vStringValue (token->string):
""));
}
#endif

static const char *tokenTypeName(enum eTokenType e)
{ /* Generated by misc/enumstr.sh with cmdline "parsers/jscript.c" "eTokenType" "tokenTypeName" */
Expand Down Expand Up @@ -2654,6 +2656,7 @@ static const char *tokenTypeName(enum eTokenType e)
}
}

#if 0
static const char *keywordName(enum eKeywordId e)
{ /* Generated by misc/enumstr.sh with cmdline "parsers/jscript.c" "eKeywordId" "keywordName" */
switch (e)
Expand Down Expand Up @@ -2690,6 +2693,7 @@ static const char *keywordName(enum eKeywordId e)
}
}
#endif
#endif

static void initialize (const langType language)
{
Expand Down

0 comments on commit 2cf5f15

Please sign in to comment.