Hello!
While chasing down these `clang` warnings I found that some code is redundant and can be safely removed: ``` main/parse.c:5007:26: warning: unused function 'FallbackParser' [-Wunused-function] static parserDefinition *FallbackParser (void) ^ main/parse.c:5040:26: warning: unused function 'CTagsParser' [-Wunused-function] static parserDefinition *CTagsParser (void) ^ main/parse.c:5355:26: warning: unused function 'CTagsSelfTestParser' [-Wunused-function] static parserDefinition *CTagsSelfTestParser (void) ^ ```
This is because we explicitly define `EXTERNAL_PARSER_LIST ` in tm_parsers.h at https://github.com/geany/geany/blob/master/src/tagmanager/tm_parsers.h#L16 so guess no need to check for not defined case?
Thanks! You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2890
-- Commit Summary --
* Remove redundant code
-- File Changes --
M ctags/main/parse.c (338) M ctags/main/parse_p.h (13)
-- Patch Links --
https://github.com/geany/geany/pull/2890.patch https://github.com/geany/geany/pull/2890.diff
Thanks but, the code in the ctags directory is imported mostly unchanged from Universal ctags project, so anything changed in that will simply be re-instated when the ctags version is updated.
There is likely to be a lot of unused stuff there and we just let the linker leave out unused functions. For `static` ones like those hopefully either the compiler or the linker will omit them. If not well they don't add up to much compared to the effort to remove them, the idea is to use ctags as little changed as possible so updates are easy.
Closed #2890.
github-comments@lists.geany.org