Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 07 Oct 2023 20:03:51 UTC Commit: f3f0cf19840e0acfb27bc33966f20326a0c72d4e https://github.com/geany/geany/commit/f3f0cf19840e0acfb27bc33966f20326a0c72d...
Log Message: ----------- "Fix" some GCC -Wparentheses warnings
It's a useful warning in general, so explicitly parenthesize cases that actually do it on purpose.
Modified Paths: -------------- src/symbols.c src/tagmanager/tm_workspace.c
Modified: src/symbols.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -430,7 +430,7 @@ static void tag_list_add_groups(GtkTreeStore *tree_store, TMParserType lang)
g_return_if_fail(top_level_iter_names);
- for (i = 0; title = tm_parser_get_sidebar_info(lang, i, &icon_id); i++) + for (i = 0; (title = tm_parser_get_sidebar_info(lang, i, &icon_id)) != NULL; i++) { GtkTreeIter *iter = &tv_iters[i]; GdkPixbuf *icon = NULL;
Modified: src/tagmanager/tm_workspace.c 6 lines changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -845,7 +845,7 @@ static GHashTable *get_includes(TMSourceFile *source, GPtrArray **header_candida return includes;
src_basename = g_strdup(source->short_name); - if (ptr = strrchr(src_basename, '.')) + if ((ptr = strrchr(src_basename, '.')) != NULL) *ptr = '\0';
headers = tm_tags_extract(source->tags_array, tm_tag_include_t); @@ -863,7 +863,7 @@ static GHashTable *get_includes(TMSourceFile *source, GPtrArray **header_candida if (!*header_candidates) { gchar *hdr_basename = g_strdup(hdr_name); - if (ptr = strrchr(hdr_basename, '.')) + if ((ptr = strrchr(hdr_basename, '.')) != NULL) *ptr = '\0';
if (g_strcmp0(hdr_basename, src_basename) == 0) @@ -1103,7 +1103,7 @@ find_scope_members_tags (const GPtrArray *all, TMTag *type_tag, gboolean namespa
g_free(stripped);
- for (i = 0; parent = split_strv[i]; i++) + for (i = 0; (parent = split_strv[i]) != NULL; i++) { GPtrArray *parent_tags;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).