Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
Moved __unused__ attributes for compatibility with gcc-3.2.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@338 c5d04d22-be80-434c-894e-aa346cc9e8e8
  • Loading branch information
darren committed Jul 11, 2003
1 parent 4ac8171 commit 74e1bb9
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion eiffel.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ static void findKeyword (tokenInfo *const token, const keywordId keyword)
readToken (token);
}

static void parseGeneric (tokenInfo *const token, boolean __unused__ declaration)
static void parseGeneric (tokenInfo *const token, boolean declaration __unused__)
{
unsigned int depth = 0;
#ifdef TYPE_REFERENCE_TOOL
Expand Down
30 changes: 15 additions & 15 deletions lregex.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,11 @@ extern void findRegexTags (void)
#endif /* HAVE_REGEX */

extern void addTagRegex (
const langType __unused__ language,
const char* const __unused__ regex,
const char* const __unused__ name,
const char* const __unused__ kinds,
const char* const __unused__ flags)
const langType language __unused__,
const char* const regex __unused__,
const char* const name __unused__,
const char* const kinds __unused__,
const char* const flags __unused__)
{
#ifdef HAVE_REGEX
Assert (regex != NULL);
Expand All @@ -556,10 +556,10 @@ extern void addTagRegex (
}

extern void addCallbackRegex (
const langType __unused__ language,
const char* const __unused__ regex,
const char* const __unused__ flags,
const regexCallback __unused__ callback)
const langType language __unused__,
const char* const regex __unused__,
const char* const flags __unused__,
const regexCallback callback __unused__)
{
#ifdef HAVE_REGEX
Assert (regex != NULL);
Expand All @@ -573,7 +573,7 @@ extern void addCallbackRegex (
}

extern void addLanguageRegex (
const langType __unused__ language, const char* const __unused__ regex)
const langType language __unused__, const char* const regex __unused__)
{
#ifdef HAVE_REGEX
if (! regexBroken)
Expand All @@ -594,7 +594,7 @@ extern void addLanguageRegex (
*/

extern boolean processRegexOption (const char *const option,
const char *const __unused__ parameter)
const char *const parameter __unused__)
{
boolean handled = FALSE;
const char* const dash = strchr (option, '-');
Expand All @@ -616,7 +616,7 @@ extern boolean processRegexOption (const char *const option,
return handled;
}

extern void disableRegexKinds (const langType __unused__ language)
extern void disableRegexKinds (const langType language __unused__)
{
#ifdef HAVE_REGEX
if (language <= SetUpper && Sets [language].count > 0)
Expand All @@ -631,8 +631,8 @@ extern void disableRegexKinds (const langType __unused__ language)
}

extern boolean enableRegexKind (
const langType __unused__ language,
const int __unused__ kind, const boolean __unused__ mode)
const langType language __unused__,
const int kind __unused__, const boolean mode __unused__)
{
boolean result = FALSE;
#ifdef HAVE_REGEX
Expand All @@ -652,7 +652,7 @@ extern boolean enableRegexKind (
return result;
}

extern void printRegexKinds (const langType __unused__ language, boolean indent)
extern void printRegexKinds (const langType language __unused__, boolean indent)
{
#ifdef HAVE_REGEX
if (language <= SetUpper && Sets [language].count > 0)
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ extern boolean isDestinationStdout (void)
}

extern void processExcludeOption (
const char *const __unused__ option, const char *const parameter)
const char *const option __unused__, const char *const parameter)
{
const char *const fileName = parameter + 1;
if (parameter [0] == '\0')
Expand Down
2 changes: 1 addition & 1 deletion maintainer.mak
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ WEB_ARCHIVE_DIR = releases
CTAGS_WEBSITE = website
DEP_DIR = .deps

CC = gcc3
CC = gcc
INCLUDE = -I.
DEFS = -DHAVE_CONFIG_H
COMP_FLAGS = $(INCLUDE) $(DEFS) $(CFLAGS)
Expand Down
21 changes: 13 additions & 8 deletions options.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ extern boolean isIncludeFile (const char *const fileName)
*/

static void processEtagsInclude (
const char *const __unused__ option, const char *const parameter)
const char *const option, const char *const parameter)
{
if (! Option.etags)
error (FATAL, "Etags must be enabled to use \"%s\" option", option);
Expand Down Expand Up @@ -814,7 +814,7 @@ static void processFieldsOption (
}

static void processFilterTerminatorOption (
const char *const __unused__ option, const char *const parameter)
const char *const option __unused__, const char *const parameter)
{
freeString (&Option.filterTerminator);
Option.filterTerminator = stringCopy (parameter);
Expand Down Expand Up @@ -876,7 +876,8 @@ static void printProgramIdentification (void)
}

static void processHelpOption (
const char *const __unused__ option, const char *const __unused__ parameter)
const char *const option __unused__,
const char *const parameter __unused__)
{
printProgramIdentification ();
putchar ('\n');
Expand Down Expand Up @@ -1084,7 +1085,8 @@ static void processLanguagesOption (
}

static void processLicenseOption (
const char *const __unused__ option, const char *const __unused__ parameter)
const char *const option __unused__,
const char *const parameter __unused__)
{
printProgramIdentification ();
puts ("");
Expand All @@ -1110,7 +1112,8 @@ static void processListKindsOption (
}

static void processListMapsOption (
const char *const __unused__ option, const char *const __unused__ parameter)
const char *const __unused__ option,
const char *const __unused__ parameter)
{
if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0)
printLanguageMaps (LANG_AUTO);
Expand All @@ -1126,9 +1129,10 @@ static void processListMapsOption (
}

static void processListLanguagesOption (
const char *const __unused__ option, const char *const __unused__ parameter)
const char *const option __unused__,
const char *const parameter __unused__)
{
printLanguageList();
printLanguageList ();
FilesRequired = FALSE;
}

Expand Down Expand Up @@ -1300,7 +1304,8 @@ static void processIgnoreOption (const char *const list)
}

static void processVersionOption (
const char *const __unused__ option, const char *const __unused__ parameter)
const char *const option __unused__,
const char *const parameter __unused__)
{
printProgramIdentification ();
exit (0);
Expand Down
2 changes: 1 addition & 1 deletion parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ extern void freeParserResources (void)
*/

extern void processLanguageDefineOption (
const char *const option, const char *const __unused__ parameter)
const char *const option, const char *const parameter __unused__)
{
#ifdef HAVE_REGEX
if (parameter [0] == '\0')
Expand Down
2 changes: 1 addition & 1 deletion parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ extern boolean processRegexOption (const char *const option, const char *const p
extern void addLanguageRegex (const langType language, const char* const regex);
extern void addTagRegex (const langType language, const char* const regex, const char* const name, const char* const kinds, const char* const flags);
extern void addCallbackRegex (const langType language, const char *const regex, const char *const flags, const regexCallback callback);
extern void disableRegexKinds (const langType __unused__ language);
extern void disableRegexKinds (const langType language);
extern boolean enableRegexKind (const langType language, const int kind, const boolean mode);
extern void printRegexKinds (const langType language, boolean indent);
extern void freeRegexResources (void);
Expand Down

0 comments on commit 74e1bb9

Please sign in to comment.