[geany/geany-plugins] e1906f: scope: code re-factoring to prevent false positive from cppcheck. (#633)

LarsGit223 git-noreply at xxxxx
Wed Oct 18 21:22:30 UTC 2017


Branch:      refs/heads/master
Author:      LarsGit223 <LarsGit223 at users.noreply.github.com>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Wed, 18 Oct 2017 21:22:30 UTC
Commit:      e1906f72f8f2bdf92f8f6171d9cf7c3fa5d88f17
             https://github.com/geany/geany-plugins/commit/e1906f72f8f2bdf92f8f6171d9cf7c3fa5d88f17

Log Message:
-----------
scope: code re-factoring to prevent false positive from cppcheck. (#633)

Closes #398.


Modified Paths:
--------------
    scope/src/Makefile.am
    scope/src/store/scptreestore.c

Modified: scope/src/Makefile.am
3 lines changed, 0 insertions(+), 3 deletions(-)
===================================================================
@@ -58,7 +58,4 @@ scope_la_CFLAGS = $(AM_CFLAGS) $(VTE_CFLAGS) \
 	-DPLUGINHTMLDOCDIR=\"$(plugindocdir)/html\" \
 	-Wno-shadow
 
-# http://trac.cppcheck.net/ticket/7243
-AM_CPPCHECKFLAGS = --suppress='unknownEvaluationOrder:$(srcdir)/store/scptreestore.c:909'
-
 include $(top_srcdir)/build/cppcheck.mk


Modified: scope/src/store/scptreestore.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -906,7 +906,7 @@ GtkTreePath *scp_tree_store_get_path(VALIDATE_ONLY ScpTreeStore *store, GtkTreeI
 	{
 		gtk_tree_path_append_index(path, ITER_INDEX(iter));
 
-		while ((elem = elem->parent), elem->parent)
+		for (elem = elem->parent; elem->parent; elem = elem->parent)
 		{
 			gint index = scp_ptr_array_find(elem->parent->children, elem);
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list