[Github-comments] [geany/geany] TM cleanups (#957)
Colomban Wendling
notifications at xxxxx
Tue May 3 21:36:55 UTC 2016
> + if (map->entries[i].kind == kinds[j])
> + ctags_found = TRUE;
> + /* check that for every type in ctags there's a type in TM */
> + if (map->entries[j].kind == kinds[i])
> + tm_found = TRUE;
> + if (ctags_found && tm_found)
> + break;
> + }
> + if (!ctags_found)
> + g_warning("Tag type '%c' found in TM but not in ctags for %s",
> + map->entries[i].kind, tm_ctags_get_lang_name(lang));
> + if (!tm_found)
> + g_warning("Tag type '%c' found in ctags but not in TM for %s",
> + kinds[i], tm_ctags_get_lang_name(lang));
> +
> + presence_map[map->entries[i].kind]++;
```gcc
../../../tagmanager/src/tm_parser.c: In function 'tm_parser_verify_type_mappings':
../../../tagmanager/src/tm_parser.c:637:16: warning: array subscript has type 'char' [-Wchar-subscripts]
presence_map[map->entries[i].kind]++;
^
```
casting to `unsigned char` should be fine.
---
BTW, `presence_map` could be 127 bytes only and indexed as `((unsigned char) map->entries[i].kind) & 0x0f`, kind names won't use non-ASCII letters. But that's probably an over-optimization that might blow off on us someday.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/957/files/5d9376ea801a6e6c3ec22748741362a3a2eff7ac#r61960591
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160503/5bd9702c/attachment.html>
More information about the Github-comments
mailing list