Skip to content

Commit d03e4c2

Browse files
committed
Remove unused local and static global variables
Remove unused local and static global variables. Variables have been identified by Understand (version 758) from Scitools.
1 parent ed39dab commit d03e4c2

33 files changed

+12
-101
lines changed

src/cite.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
6363
t << "\\bibliographystyle{" << style << "}\n"
6464
"\\bibliography{";
6565
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
66-
QCString latexOutputDir = Config_getString("LATEX_OUTPUT")+"/";
6766
int i = 0;
6867
const char *bibdata = citeDataList.first();
6968
while (bibdata)

src/classdef.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4031,7 +4031,6 @@ int ClassDef::countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom,
40314031
static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
40324032
if (!inlineInheritedMembers) // show inherited members as separate lists
40334033
{
4034-
QPtrDict<void> visited(17);
40354034
count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
40364035
}
40374036
}

src/code.l

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,6 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
12361236
{
12371237
int vi;
12381238
QCString vn=varName;
1239-
QCString scope;
12401239
if ((vi=vn.findRev("::"))!=-1 || (vi=vn.findRev('.'))!=-1) // explicit scope A::b(), probably static member
12411240
{
12421241
ClassDef *jcd = getClass(vn.left(vi));

src/config.l

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -431,19 +431,11 @@ static bool *b=0;
431431
static QStrList *l=0;
432432
static int lastState;
433433
static QCString elemStr;
434-
static QCString includeName;
435434
static QStrList includePathList;
436435
static QStack<ConfigFileState> includeStack;
437436
static int includeDepth;
438437
static bool config_upd = FALSE;
439438

440-
static QCString tabSizeString;
441-
static QCString maxInitLinesString;
442-
static QCString colsInAlphaIndexString;
443-
static QCString enumValuesPerLineString;
444-
static QCString treeViewWidthString;
445-
static QCString maxDotGraphWidthString;
446-
static QCString maxDotGraphHeightString;
447439
static QCString encoding;
448440

449441
static Config *config;

src/declinfo.l

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ static QCString funcTempList;
4545
static QCString type;
4646
static QCString name;
4747
static QCString args;
48-
static QCString tmpType;
4948
static int sharpCount;
5049
static bool classTempListFound;
5150
static bool funcTempListFound;

src/dirdef.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ void DirDef::addFile(FileDef *fd)
8080

8181
static QCString encodeDirName(const QCString &anchor)
8282
{
83-
QCString result;
84-
8583
// convert to md5 hash
8684
uchar md5_sig[16];
8785
QCString sigStr(33);
@@ -90,6 +88,7 @@ static QCString encodeDirName(const QCString &anchor)
9088
return sigStr;
9189

9290
// old algorithm
91+
// QCString result;
9392

9493
// int l = anchor.length(),i;
9594
// for (i=0;i<l;i++)

src/docbookgen.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,9 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de
589589
t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>";
590590
t << " (" << endl;
591591
ArgumentList *declAl = md->declArgumentList();
592-
ArgumentList *defAl = md->argumentList();
593592
if (declAl && declAl->count()>0)
594593
{
595594
ArgumentListIterator declAli(*declAl);
596-
ArgumentListIterator defAli(*defAl);
597595
Argument *a;
598596
int cnt=0;
599597
for (declAli.toFirst();(a=declAli.current());++declAli)
@@ -812,15 +810,14 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de
812810
}
813811
}
814812

815-
static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,const char *kind,
813+
static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,const char *,
816814
bool detailed=0, const char *header=0,const char *documentation=0)
817815
{
818816
if (ml==0) return;
819817
MemberListIterator mli(*ml);
820818
MemberDef *md;
821819
int count=0;
822820
int doc_count=0;
823-
QCString compkind = kind;
824821
QCString title, desctitle;
825822

826823
for (mli.toFirst();(md=mli.current());++mli)

src/docbookvisitor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,6 @@ void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s)
13261326
shortName=shortName.right(shortName.length()-i-1);
13271327
}
13281328
QCString outDir = Config_getString("DOCBOOK_OUTPUT");
1329-
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
13301329
writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP);
13311330
visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height());
13321331
visitCaption(this, s->children());

src/docparser.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
844844
const QCString &cmdName)
845845
{
846846
DBG(("handleStyleArgument(%s)\n",qPrint(cmdName)));
847-
QCString tokenName = g_token->name;
848847
int tok=doctokenizerYYlex();
849848
if (tok!=TK_WHITESPACE)
850849
{
@@ -1178,7 +1177,6 @@ static void handleParameterType(DocNode *parent,QList<DocNode> &children,const Q
11781177
{
11791178
QCString name = g_token->name;
11801179
int p=0,i;
1181-
QCString type;
11821180
while ((i=paramTypes.find('|',p))!=-1)
11831181
{
11841182
g_token->name = paramTypes.mid(p,i-p);
@@ -2137,7 +2135,6 @@ DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
21372135

21382136
bool DocXRefItem::parse()
21392137
{
2140-
QCString listName;
21412138
RefList *refList = Doxygen::xrefLists->find(m_key);
21422139
if (refList &&
21432140
(
@@ -2571,7 +2568,6 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
25712568
{
25722569
static uint numBibFiles = Config_getList("CITE_BIB_FILES").count();
25732570
m_parent = parent;
2574-
QCString anchor;
25752571
//printf("DocCite::DocCite(target=%s)\n",target.data());
25762572
ASSERT(!target.isEmpty());
25772573
m_relPath = g_relPath;

src/dot.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ static const char svgZoomFooter[] =
156156

157157
//--------------------------------------------------------------------
158158

159-
static const int maxCmdLine = 40960;
160-
161159
/*! mapping from protection levels to color names */
162160
static const char *normalEdgeColorMap[] =
163161
{
@@ -3147,8 +3145,6 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
31473145
regenerate=TRUE;
31483146
if (graphFormat==GOF_BITMAP) // run dot to create a bitmap image
31493147
{
3150-
QCString dotArgs(maxCmdLine);
3151-
31523148
DotRunner *dotRun = new DotRunner(absDotName,
31533149
d.absPath().data(),TRUE,absImgName);
31543150
dotRun->addJob(imgExt,absImgName);
@@ -3506,7 +3502,6 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
35063502
if (graphFormat==GOF_BITMAP)
35073503
{
35083504
// run dot to create a bitmap image
3509-
QCString dotArgs(maxCmdLine);
35103505
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
35113506
dotRun->addJob(imgExt,absImgName);
35123507
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
@@ -3819,7 +3814,6 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
38193814
if (graphFormat==GOF_BITMAP)
38203815
{
38213816
// run dot to create a bitmap image
3822-
QCString dotArgs(maxCmdLine);
38233817
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
38243818
dotRun->addJob(imgExt,absImgName);
38253819
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
@@ -3984,7 +3978,6 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
39843978
if (graphFormat==GOF_BITMAP)
39853979
{
39863980
// run dot to create a bitmap image
3987-
QCString dotArgs(maxCmdLine);
39883981
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
39893982
dotRun->addJob(imgExt,absImgName);
39903983
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
@@ -4512,7 +4505,6 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
45124505
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
45134506
QCString baseName = m_diskName;
45144507
QCString imgName = baseName+"."+imgExt;
4515-
QCString mapName = baseName+".map";
45164508
QCString absPath = d.absPath().data();
45174509
QCString absBaseName = absPath+"/"+baseName;
45184510
QCString absDotName = absBaseName+".dot";
@@ -4539,8 +4531,6 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
45394531

45404532
if (graphFormat==GOF_BITMAP) // run dot to create a bitmap image
45414533
{
4542-
QCString dotArgs(maxCmdLine);
4543-
45444534
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
45454535
dotRun->addJob(imgExt,absImgName);
45464536
if (writeImageMap) dotRun->addJob(MAP_CMD,absMapName);

src/doxygen.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,6 @@ static MemberDef *addVariableToFile(
24582458

24592459
// see if the function is inside a namespace
24602460
NamespaceDef *nd = 0;
2461-
QCString nscope;
24622461
if (!scope.isEmpty())
24632462
{
24642463
if (scope.find('@')!=-1) return 0; // anonymous scope!
@@ -5493,7 +5492,6 @@ static bool findGlobalMember(EntryNav *rootNav,
54935492
{
54945493
Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n",
54955494
md->name().data(),namespaceName.data());
5496-
QCString nsName = nd ? nd->name().data() : "";
54975495

54985496
NamespaceDef *rnd = 0;
54995497
if (!namespaceName.isEmpty()) rnd = Doxygen::namespaceSDict->find(namespaceName);

src/filedef.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,6 @@ void FileDef::addIncludedUsingDirectives()
12961296
visited=TRUE;
12971297
//printf("( FileDef::addIncludedUsingDirectives for file %s\n",name().data());
12981298

1299-
NamespaceList nl;
13001299
if (m_includeList) // file contains #includes
13011300
{
13021301
{
@@ -1542,7 +1541,6 @@ static Directory *findDirNode(Directory *root,const QCString &name)
15421541

15431542
static void mergeFileDef(Directory *root,FileDef *fd)
15441543
{
1545-
QCString rootPath = root->name();
15461544
QCString filePath = fd->absFilePath();
15471545
//printf("merging %s\n",filePath.data());
15481546
Directory *dirNode = findDirNode(root,filePath);

src/fortranscanner.l

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ static ScanVar v_type = V_IGNORE; // type of parsed variable
165165
static QList<Entry> moduleProcedures; // list of all interfaces which contain unresolved
166166
// module procedures
167167
static QCString docBlock;
168-
static QCString docBlockName;
169168
static bool docBlockInBody = FALSE;
170169
static bool docBlockJavaStyle;
171170

src/htags.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ bool Htags::execute(const QCString &htmldir)
105105
bool Htags::loadFilemap(const QCString &htmlDir)
106106
{
107107
QCString fileMapName = htmlDir+"/HTML/FILEMAP";
108-
QCString fileMap;
109108
QFileInfo fi(fileMapName);
110109
/*
111110
* Construct FILEMAP dictionary using QDict.

src/htmldocvisitor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,6 @@ void HtmlDocVisitor::visitPost(DocPara *p)
10631063
}
10641064
}
10651065

1066-
QCString context;
10671066
// if the last element of a paragraph is something that should be outside of
10681067
// the paragraph (<ul>,<dl>,<table>) then that will already have ended the
10691068
// paragraph and we don't need to do it here

src/index.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,6 @@ static void writeAnnotatedClassList(OutputList &ol)
16011601
}
16021602
if (cd->isLinkableInProject() && cd->templateMaster()==0)
16031603
{
1604-
QCString type=cd->compoundTypeString();
16051604
ol.startIndexKey();
16061605
if (cd->getLanguage()==SrcLangExt_VHDL)
16071606
{

src/mangen.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ ManGenerator::~ManGenerator()
107107

108108
void ManGenerator::init()
109109
{
110-
QCString ext = getExtension();
111110
QCString &manOutput = Config_getString("MAN_OUTPUT");
112111

113112
QDir d(manOutput);

src/markdown.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,6 @@ static int processLink(GrowBuf &out,const char *data,int,int size)
810810
{
811811
return 0;
812812
}
813-
static QRegExp re("^[@\\]ref ");
814813
if (isToc) // special case for [TOC]
815814
{
816815
if (g_current) g_current->stat=TRUE;

src/memberdef.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
25532553

25542554
QCString cname = container->name();
25552555
QCString cfname = getOutputFileBase();
2556-
QCString cfiname = container->getOutputFileBase();
25572556

25582557
// get member name
25592558
QCString doxyName=name();

src/msc.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
169169
QCString mscExe = Config_getString("MSCGEN_PATH")+"mscgen"+portable_commandExtension();
170170
QCString mscArgs = "-T ismap -i \"";
171171
mscArgs+=inFile;
172-
QFileInfo fi(inFile);
173172
mscArgs+="\" -o \"";
174173
mscArgs+=outFile + "\"";
175174

@@ -201,7 +200,6 @@ void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile,
201200
)
202201
{
203202
QCString mapName = baseName+".map";
204-
QCString mapFile = inFile+".map";
205203
t << "<img src=\"" << relPath << baseName << ".";
206204
switch (format)
207205
{

src/perlmodgen.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,6 @@ void PerlModDocVisitor::visitPost(DocParBlock *)
13711371

13721372
static void addTemplateArgumentList(ArgumentList *al,PerlModOutput &output,const char *)
13731373
{
1374-
QCString indentStr;
13751374
if (!al)
13761375
return;
13771376
output.openList("template_parameters");

src/portable.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ uint portable_pid()
194194
return pid;
195195
}
196196

197-
static char **last_environ;
197+
#if defined(_WIN32) && !defined(__CYGWIN__)
198+
#else
199+
static char **last_environ;
200+
#endif
198201

199202
void portable_setenv(const char *name,const char *value)
200203
{

src/pycode.l

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ static int g_paramParens;
7979

8080
static bool g_exampleBlock;
8181
static QCString g_exampleName;
82-
static QCString g_exampleFile;
8382

8483
static QCString g_type;
8584
static QCString g_name;

src/pyscanner.l

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static Specifier virt;
8383

8484
static int docBlockContext;
8585
static QCString docBlock;
86-
static QCString docBlockName;
8786
static bool docBlockInBody;
8887
static bool docBlockJavaStyle;
8988
static bool docBrief;
@@ -97,7 +96,6 @@ static int g_indent = 0;
9796
static int g_curIndent = 0;
9897

9998
static QDict<QCString> g_packageNameCache(257);
100-
static QCString g_packageScope;
10199

102100
static char g_atomStart;
103101
static char g_atomEnd;
@@ -931,7 +929,6 @@ STARTDOCSYMS "##"
931929
"=" { // default value
932930
// TODO: this rule is too simple, need to be able to
933931
// match things like =")" as well!
934-
QCString defVal=&yytext[1];
935932
g_defVal.resize(0);
936933
g_braceCount=0;
937934
BEGIN(FunctionParamDefVal);

src/scanner.l

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static int roundCount = 0 ;
8383
static int curlyCount = 0 ;
8484
static int squareCount = 0 ;
8585
static int padCount = 0 ;
86-
static QCString slString;
8786
static Entry* current_root = 0 ;
8887
static Entry* global_root = 0 ;
8988
static Entry* current = 0 ;
@@ -114,7 +113,6 @@ static QCString aliasName;
114113
static QCString baseName;
115114
static QCString* specName;
116115
static QCString formulaText;
117-
static QCString formulaEnd;
118116
static bool useOverrideCommands = FALSE;
119117

120118
static SrcLangExt language;
@@ -162,13 +160,7 @@ static bool needsSemi;
162160

163161
//static int depthIf;
164162
static int initBracketCount;
165-
static QCString memberGroupRelates;
166-
static QCString memberGroupInside;
167-
static QCString xrefItemKey;
168-
static QCString xrefItemTitle;
169-
static QCString xrefListTitle;
170163

171-
static QCString g_skipBlockName;
172164
static QCString oldStyleArgType;
173165
static QCString docBackup;
174166
static QCString briefBackup;

src/searchindex.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ void SearchIndex::write(const char *fileName)
310310
padding = size - padding;
311311

312312
//int statsOffset = size;
313-
QDictIterator<IndexWord> wdi(m_words);
314313
//IndexWord *iw;
315314
int *wordStatOffsets = new int[m_words.count()];
316315

@@ -1077,7 +1076,6 @@ void writeJavascriptSearchIndex()
10771076
for (li.toFirst();(dl=li.current());++li)
10781077
{
10791078
Definition *d = dl->getFirst();
1080-
QCString id = d->localName();
10811079

10821080
if (!firstEntry)
10831081
{

0 commit comments

Comments
 (0)