Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Thu, 02 May 2024 21:52:06 UTC
Commit: a235afb4c6286a5221d12891b2ec374cbe182446
https://github.com/geany/geany-plugins/commit/a235afb4c6286a5221d12891b2ec3…
Log Message:
-----------
markdown: Slightly rewrite two tests for cppcheck's sake
It's admittedly hard for a static analyzer to know that if the error
pointer is non-NULL, the return value ought to be NULL; but as here
the revers is also true we can simply check the value and assume the
error is set.
Modified Paths:
--------------
markdown/src/conf.c
Modified: markdown/src/conf.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -233,7 +233,7 @@ markdown_config_get_string_key(MarkdownConfig *conf, const gchar *group,
GError *error = NULL;
out_str = g_key_file_get_string(conf->priv->kf, group, key, &error);
- if (error) {
+ if (!out_str) {
g_debug("Config read failed: %s", error->message);
g_error_free(error); error = NULL;
out_str = g_strdup(default_value);
@@ -451,7 +451,7 @@ markdown_config_save(MarkdownConfig *conf)
/*g_debug("Saving: %s\n%s", conf->priv->filename, contents);*/
- if (error) {
+ if (!contents) {
g_warning("Error getting config data as string: %s", error->message);
g_error_free(error); error = NULL;
return success;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 30 Apr 2024 21:19:11 UTC
Commit: 3d1a5aa72b4e3905e0da108ec1c3a5033bc7961c
https://github.com/geany/geany-plugins/commit/3d1a5aa72b4e3905e0da108ec1c3a…
Log Message:
-----------
ci: Enable exhaustive cppcheck checking
Without this cppcheck actually complains that it's not exhaustive to
the point where it exits with an error.
This is likely a cppcheck bug, but it's probably OK for us to use the
exhaustive mode so let's do this at least for now.
Modified Paths:
--------------
.github/workflows/build.yml
Modified: .github/workflows/build.yml
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -21,6 +21,7 @@ concurrency:
env:
CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration
CONFIGURE_FLAGS: --disable-silent-rules
+ CPPCHECKFLAGS: --check-level=exhaustive
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 1G
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 30 Apr 2024 21:19:11 UTC
Commit: e3f2816ceb5ec08bd16597c045b130c3d18e43ea
https://github.com/geany/geany-plugins/commit/e3f2816ceb5ec08bd16597c045b13…
Log Message:
-----------
cppcheck: Enable inline suppression hints
This allows to insert suppressions directly in the code, which is a lot
more robust against changes than listing file/line combo, and a lot
more fine-grained than disabling an entire check for a whole file or
even plugin.
Modified Paths:
--------------
build/cppcheck.mk
Modified: build/cppcheck.mk
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -3,6 +3,7 @@ if HAVE_CPPCHECK
check-cppcheck: $(srcdir)
$(CPPCHECK) \
+ --inline-suppr \
-q --template=gcc --error-exitcode=2 \
--library=gtk \
--library=$(top_srcdir)/build/cppcheck-geany-plugins.cfg \
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).