Merge pull request #2466 from cgwalters/ci-fanalyzer

ci: Enable -fanalyzer
This commit is contained in:
Luca Bruno 2021-10-18 16:44:56 +00:00 committed by GitHub
commit 5d045f3ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -30,6 +30,6 @@ esac
# always fail on warnings; https://github.com/ostreedev/ostree/pull/971 # always fail on warnings; https://github.com/ostreedev/ostree/pull/971
# NB: this disables the default set of flags from configure.ac # 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:-} build --enable-gtk-doc ${CONFIGOPTS:-}

View File

@ -75,8 +75,8 @@ test_rollsum (void)
#define MAX_BUFFER_SIZE 1000000 #define MAX_BUFFER_SIZE 1000000
gsize i; gsize i;
int len; int len;
g_autofree unsigned char *a = malloc (MAX_BUFFER_SIZE); g_autofree unsigned char *a = g_malloc (MAX_BUFFER_SIZE);
g_autofree unsigned char *b = malloc (MAX_BUFFER_SIZE); g_autofree unsigned char *b = g_malloc (MAX_BUFFER_SIZE);
g_autoptr(GRand) rand = g_rand_new (); g_autoptr(GRand) rand = g_rand_new ();
/* These two buffers produce the same crc32. */ /* These two buffers produce the same crc32. */