From 66914e44df6c05fbdb6011f9a10b3a0fa5e9a08c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 8 Jan 2025 09:59:58 +0100 Subject: [PATCH 1/2] workflows: Run unit tests with -Werror Configure with `--enable-strict`, which will fail the build on warnings. Commit 5a0a6ab4ae50 accidentally introduced some, and we don't want more warnings to creep into the code. --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0c2f21aedf46..4cd63cb469ef 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -33,6 +33,6 @@ jobs: vendor/checkout test/common/make-bots - ./autogen.sh + ./autogen.sh --enable-strict make -j$(nproc) '${{ matrix.target }}' EOF From c53e10ee4c470ab2cbe14ed8ba76e6ee48e7b073 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 8 Jan 2025 10:01:21 +0100 Subject: [PATCH 2/2] ws: Drop unused variables Commit 5a0a6ab4ae50 removed their usage, but didn't remove their declarations. --- src/ws/cockpithandlers.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ws/cockpithandlers.c b/src/ws/cockpithandlers.c index 227570f46eaa..5390c28deac5 100644 --- a/src/ws/cockpithandlers.c +++ b/src/ws/cockpithandlers.c @@ -345,10 +345,7 @@ build_environment (CockpitAuth *auth, GHashTable *request_headers) GByteArray *buffer; GBytes *bytes; JsonObject *object; - const gchar *value; gchar *hostname; - JsonObject *osr; - gint i; object = json_object_new ();