diff --git a/pressure-vessel/flatpak-exports.c b/pressure-vessel/flatpak-exports.c
index fdc2630cb8e8140dd9456a1038be980d304c540c..6544cfac83333eda7180006c0e25667f4fa66663 100644
--- a/pressure-vessel/flatpak-exports.c
+++ b/pressure-vessel/flatpak-exports.c
@@ -51,7 +51,6 @@
 #if defined(__GNUC__) && __GNUC__ >= 8
 # pragma GCC diagnostic ignored "-Wcast-function-type"
 #endif
-#pragma GCC diagnostic ignored "-Wshadow"
 #pragma GCC diagnostic ignored "-Wtype-limits"
 
 /* We don't want to export paths pointing into these, because they are readonly
@@ -436,8 +435,6 @@ flatpak_exports_append_bwrap_args (FlatpakExports *exports,
 
       if (exports->host_etc == FLATPAK_FILESYSTEM_MODE_NONE)
         {
-          guint i;
-
           /* We are exposing the host /usr (and friends) but not the
            * host /etc. Additionally expose just enough of /etc to make
            * things that want to read /usr work as expected.