summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Bruno <luca.bruno@coreos.com>2021-10-18 16:44:56 +0000
committerGitHub <noreply@github.com>2021-10-18 16:44:56 +0000
commit5d045f3ae1a0cec43c117c497e9fa980ea2e474d (patch)
tree9db4b8bfd2b1b42265e7b3c47c852694029435c1
parentec8cf31e98c0901758b9504a196ca007a358fc3b (diff)
parent58dc6a08b49384cbde3346f6b0675d684fe7c8db (diff)
downloadostree-5d045f3ae1a0cec43c117c497e9fa980ea2e474d.tar.gz
Merge pull request #2466 from cgwalters/ci-fanalyzer
ci: Enable -fanalyzer
-rwxr-xr-xci/build.sh2
-rw-r--r--tests/test-rollsum.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 2afcd018..ffdeba01 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -30,6 +30,6 @@ esac
# always fail on warnings; https://github.com/ostreedev/ostree/pull/971
# NB: this disables the default set of flags from configure.ac
-export CFLAGS="-Wall -Werror ${CFLAGS:-}"
+export CFLAGS="-Wall -Werror -fanalyzer ${CFLAGS:-}"
build --enable-gtk-doc ${CONFIGOPTS:-}
diff --git a/tests/test-rollsum.c b/tests/test-rollsum.c
index 08c78b66..08aea235 100644
--- a/tests/test-rollsum.c
+++ b/tests/test-rollsum.c
@@ -75,8 +75,8 @@ test_rollsum (void)
#define MAX_BUFFER_SIZE 1000000
gsize i;
int len;
- g_autofree unsigned char *a = malloc (MAX_BUFFER_SIZE);
- g_autofree unsigned char *b = malloc (MAX_BUFFER_SIZE);
+ g_autofree unsigned char *a = g_malloc (MAX_BUFFER_SIZE);
+ g_autofree unsigned char *b = g_malloc (MAX_BUFFER_SIZE);
g_autoptr(GRand) rand = g_rand_new ();
/* These two buffers produce the same crc32. */