Is 26fd7328cd409ceb16557a0fe637d5c028c0598f enough for properly enabling the test program on `make check`? To me it seems, it was just missing or was it intentional that the test program isn't run on `make check`? You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/644
-- Commit Summary --
* Fix cppcheck false-positive warning * Check for NULL on arguments before using strcmp() * XmlSnippets: enable test program on "make check"
-- File Changes --
M projectorganizer/src/prjorg-menu.c (2) M xmlsnippets/src/Makefile.am (1) M xmlsnippets/src/tests.c (4)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/644.patch https://github.com/geany/geany-plugins/pull/644.diff
codebrainz commented on this pull request.
@@ -80,7 +80,9 @@ static gboolean test(gint ordinal, const gchar *input, const gchar *completion_n
else if (!completion_needed && !success) return TRUE;
- if (strcmp(c.completion, completion_needed) != 0) + if ((!completion_needed && c.completion) || + (completion_needed && !c.completion) || + strcmp(c.completion, completion_needed) != 0)
Could also use [`g_strcmp0`](https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g...).
eht16 commented on this pull request.
@@ -80,7 +80,9 @@ static gboolean test(gint ordinal, const gchar *input, const gchar *completion_n
else if (!completion_needed && !success) return TRUE;
- if (strcmp(c.completion, completion_needed) != 0) + if ((!completion_needed && c.completion) || + (completion_needed && !c.completion) || + strcmp(c.completion, completion_needed) != 0)
Of course, did it and re-pushed.
If there is nothing else, I'd like to merge this soon as the nightly builds are broken for days due to cppcheck issues.
LGBI
Merged #644.
github-comments@lists.geany.org