Over time, warnings from Analyze have been fixed so that there are
now just 3 warnings for Scintilla which occur in the lexers for Perl
and Ruby. These are all 'dead code' warnings so can be fixed by
removing the code but it is possible that the dead code was meant to
be live so it is much better if people familiar with these languages
and lexers can check the warnings. The dead code may also be present
as a deliberate choice to preserve invariants in case of future
additions, in which case the warnings should be suppressed in some
way. They are, edited for brevity:
Analyze ../../lexers/LexPerl.cxx
...
scintilla/cocoa/ScintillaFramework/../../lexers/LexPerl.cxx:949:7:
warning: Value stored to 'pod' is never read
pod = SCE_PL_POD;
^ ~~~~~~~~~~
1 warning generated.
Analyze ../../lexers/LexRuby.cxx
...
scintilla/cocoa/ScintillaFramework/../../lexers/LexRuby.cxx:1195:21:
warning: Value stored to 'chNext2' is never read
chNext2 = chNext;
^ ~~~~~~
scintilla/cocoa/ScintillaFramework/../../lexers/LexRuby.cxx:1352:21:
warning: Value stored to 'chNext2' is never read
chNext2 = styler.SafeGetCharAt(i + 2);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
The versions of Clang easily available with Linux distributions
tend to be old (2.9) and are often confused by C++ code.
Neil
"else pod = SCE_PL_POD;" can be deleted. Best I can tell is that
it's a no-op artifact left over from laying out the if statements
so that all POD state switching combinations have been covered.
In detail:
The line is reached by (sc.state == SCE_PL_POD) && (pod ==
SCE_PL_DEFAULT).
(pod == SCE_PL_DEFAULT) means the POD line has some whitespace and
nothing else. It looks like an empty line so we just continue with
SCE_PL_POD, a no-op.
The other state in the block, (sc.state == SCE_PL_POD_VERB) &&
(pod == SCE_PL_DEFAULT), has some code to adjust classification of
lines-that-are-whitespace trailing a SCE_PL_POD_VERB block, a
cosmetic detail.
Thanks,
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
> --
> You received this message because you are subscribed to the Google Groups
> "scintilla-interest" group.
> To post to this group, send email to scintilla...@googlegroups.com.
> To unsubscribe from this group, send email to
> scintilla-inter...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/scintilla-interest?hl=en.
>
Neil