940a02
diff --git a/src/plugins/kbd.c b/src/plugins/kbd.c
940a02
index a2908ec..97abd3b 100644
940a02
--- a/src/plugins/kbd.c
940a02
+++ b/src/plugins/kbd.c
940a02
@@ -732,6 +732,10 @@ static gboolean wait_for_file (const char *filename) {
940a02
  *
940a02
  * Tech category: %BD_KBD_TECH_BCACHE-%BD_KBD_TECH_MODE_CREATE
940a02
  */
940a02
+/* This triggers a known false positive warning in gcc-11.  It's being
940a02
+   addressed upstream, but until the fix is available, this works around
940a02
+   the false positive.  */
940a02
+__attribute__ ((optimize ("-O1")))
940a02
 gboolean bd_kbd_bcache_create (const gchar *backing_device, const gchar *cache_device, const BDExtraArg **extra, const gchar **bcache_device, GError **error) {
940a02
     const gchar *argv[6] = {"make-bcache", "-B", backing_device, "-C", cache_device, NULL};
940a02
     gboolean success = FALSE;