Angel Pons has submitted this change. ( https://review.coreboot.org/c/libgfxinit/+/67833 )
Change subject: Fix "unnecessary with of ancestor [-gnatwr]" ......................................................................
Fix "unnecessary with of ancestor [-gnatwr]"
These warnings are a bit overeager as some of them only apply once unnecessary `use type ...` clauses are adapted. So we do both in one patch. This partially fixes building with GCC 12.
Change-Id: Id7e88fe9a3ef7cb10cbc427a052e21f12578a3fd Signed-off-by: Elyes Haouas ehaouas@noos.fr Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/67833 Reviewed-by: Angel Pons th3fanbus@gmail.com --- M common/hw-gfx-dp_aux_ch.adb M common/hw-gfx-edid.adb M common/hw-gfx-framebuffer_filler.ads M common/hw-gfx-gma-config_helpers.ads M common/hw-gfx-gma-registers.ads M common/hw-gfx-gma.ads M common/hw-gfx.ads 7 files changed, 20 insertions(+), 13 deletions(-)
Approvals: Nico Huber: Verified; Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/common/hw-gfx-dp_aux_ch.adb b/common/hw-gfx-dp_aux_ch.adb index 5b4fde4..20c2c3c 100644 --- a/common/hw-gfx-dp_aux_ch.adb +++ b/common/hw-gfx-dp_aux_ch.adb @@ -16,6 +16,7 @@ with HW.GFX.DP_Defs;
use type HW.Word8; +use type HW.Word32; use type HW.GFX.DP_Defs.Aux_Message_Command;
package body HW.GFX.DP_Aux_Ch is diff --git a/common/hw-gfx-edid.adb b/common/hw-gfx-edid.adb index f1fae58..d8dba1d 100644 --- a/common/hw-gfx-edid.adb +++ b/common/hw-gfx-edid.adb @@ -12,8 +12,6 @@ -- GNU General Public License for more details. --
-with HW; - with HW.Debug; with GNAT.Source_Info;
diff --git a/common/hw-gfx-framebuffer_filler.ads b/common/hw-gfx-framebuffer_filler.ads index 7ad3b79..ff3d343 100644 --- a/common/hw-gfx-framebuffer_filler.ads +++ b/common/hw-gfx-framebuffer_filler.ads @@ -14,10 +14,6 @@
with System;
-with HW; - -use type HW.Int32; - package HW.GFX.Framebuffer_Filler with Abstract_State => ((State with External), Base_Address), diff --git a/common/hw-gfx-gma-config_helpers.ads b/common/hw-gfx-gma-config_helpers.ads index b9f1d70..ffac9d4 100644 --- a/common/hw-gfx-gma-config_helpers.ads +++ b/common/hw-gfx-gma-config_helpers.ads @@ -12,7 +12,6 @@ -- GNU General Public License for more details. --
-with HW; with HW.GFX.GMA.Config;
private package HW.GFX.GMA.Config_Helpers diff --git a/common/hw-gfx-gma-registers.ads b/common/hw-gfx-gma-registers.ads index 3318ab1..c8ada33 100644 --- a/common/hw-gfx-gma-registers.ads +++ b/common/hw-gfx-gma-registers.ads @@ -13,7 +13,6 @@ --
with System; -with HW.GFX.GMA; with HW.GFX.GMA.Config;
private package HW.GFX.GMA.Registers diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads index afd1512..1282e89 100644 --- a/common/hw-gfx-gma.ads +++ b/common/hw-gfx-gma.ads @@ -19,6 +19,8 @@ with HW.Port_IO; with HW.GFX.Framebuffer_Filler;
+use type HW.Word32; + package HW.GFX.GMA with Abstract_State => diff --git a/common/hw-gfx.ads b/common/hw-gfx.ads index 2cfc017..f09f9dc 100644 --- a/common/hw-gfx.ads +++ b/common/hw-gfx.ads @@ -13,11 +13,6 @@ -- GNU General Public License for more details. --
-with HW; - -use type HW.Pos64; -use type HW.Word32; - package HW.GFX is
-- such that the count of pixels in any framebuffer may fit