From 6b190def9f25b79a672afb2793afa346150d274c Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 12 May 2023 14:46:23 -0400 Subject: opk/read: Ignore -Wmaybe-uninitialized false pos --- diff --git a/src/opk/read.c b/src/opk/read.c index 9a2a3a4..1e9295b 100644 --- a/src/opk/read.c +++ b/src/opk/read.c @@ -204,10 +204,14 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk) return OPKG_OPK_ERROR; # pragma GCC diagnostic pop } +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored \ + "-Wmaybe-uninitialized" /* For below #pragmas: fp initialized here * (opk->control_dir != NULL). */ /* GCC analyzer doesn't complain about this use of path? */ fp = fopen(path, "wb"); +# pragma GCC diagnostic pop if (fp == NULL) { fputs(_("Error: Failed to extract control file" "\n"), stderr); @@ -277,6 +281,8 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk) # pragma GCC diagnostic push # pragma GCC diagnostic ignored \ "-Wanalyzer-use-of-uninitialized-value" +# pragma GCC diagnostic ignored \ + "-Wmaybe-uninitialized" free(path); fclose(fp); # pragma GCC diagnostic pop -- cgit v0.9.1