Skip to content

Commit abe4ee4

Browse files
committed
parsers: Remove dead assignments
Detected by clang scan-build
1 parent 52347c9 commit abe4ee4

File tree

6 files changed

+7
-14
lines changed

6 files changed

+7
-14
lines changed

parsers/ada.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ static adaTokenInfo *adaParse(adaParseMode mode, adaTokenInfo *parent)
18791879
* found, if we didn't just fall through */
18801880
if((pos + i) < lineLen)
18811881
{
1882-
token = newAdaToken(&line[pos], i, ADA_KIND_LABEL, false, parent);
1882+
newAdaToken(&line[pos], i, ADA_KIND_LABEL, false, parent);
18831883
skipPast(">>");
18841884
token = NULL;
18851885
}

parsers/asm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static void findAsmTags (void)
369369
{
370370
while (isspace ((int) *cp))
371371
++cp;
372-
cp = readSymbol (cp, name);
372+
readSymbol (cp, name);
373373
nameFollows = true;
374374
}
375375
makeAsmTag (name, operator, labelCandidate, nameFollows, directive,

parsers/itcl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ static int parseClass (tclSubparser *s CTAGS_ATTR_UNUSED, int parentIndex,
237237
}
238238
else if (token->type == '}')
239239
{
240-
protection = KEYWORD_NONE;
241240
break;
242241
}
243242
else

parsers/nsis.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static void findNsisTags (void)
287287
else if (lineStartingWith (cp, "sectiongroup", false))
288288
{
289289
cp += 12;
290-
cp = parseSection (cp, name, K_SECTION_GROUP, CORK_NIL, &sectionGroupIndex);
290+
parseSection (cp, name, K_SECTION_GROUP, CORK_NIL, &sectionGroupIndex);
291291
}
292292
else if (lineStartingWith (cp, "sectiongroupend", true))
293293
{
@@ -298,19 +298,19 @@ static void findNsisTags (void)
298298
else if (lineStartingWith (cp, "section", false))
299299
{
300300
cp += 7;
301-
cp = parseSection (cp, name, K_SECTION, sectionGroupIndex, NULL);
301+
parseSection (cp, name, K_SECTION, sectionGroupIndex, NULL);
302302
}
303303
/* LangString */
304304
else if (lineStartingWith (cp, "langstring", false))
305305
{
306306
cp += 10;
307-
cp = parseLangString (cp, name);
307+
parseLangString (cp, name);
308308
}
309309
/* LicenseLangString */
310310
else if (lineStartingWith (cp, "licenselangstring", false))
311311
{
312312
cp += 17;
313-
cp = parseLangString (cp, name);
313+
parseLangString (cp, name);
314314
}
315315
/* definitions */
316316
else if (lineStartingWith (cp, "!define", false))

parsers/plist.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ static void plistFindTagsUnderKey (xmlNode *node,
107107
int c;
108108

109109
queue = stringListNew ();
110-
current = node;
111110
for (current = node; current; current = current->parent)
112111
{
113112
if (isCompoundElement (current)

parsers/vim.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ static void parseVimBallFile (const unsigned char *line)
623623
{
624624
vString *fname = vStringNew ();
625625
const unsigned char *cp;
626-
int file_line_count;
627626
int i;
628627

629628
/*
@@ -663,17 +662,13 @@ static void parseVimBallFile (const unsigned char *line)
663662
vStringClear (fname);
664663
}
665664

666-
file_line_count = 0;
667665
/* Next line should be the line count of the file */
668666
line = readVimLine ();
669667
if (line == NULL)
670668
{
671669
goto cleanUp;
672670
}
673-
else
674-
{
675-
file_line_count = atoi ((const char *) line);
676-
}
671+
int file_line_count = atoi ((const char *) line);
677672

678673
/* Read all lines of the file */
679674
for (i = 0; i < file_line_count; i++)

0 commit comments

Comments
 (0)