From f244e994b5ff5b6499a30171b4716f1a6983d6d8 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Mon, 5 Sep 2022 16:19:36 +0200 Subject: [Ada] Justify false alarm from CodePeer analysis of GNAT Branch is determined as dead following a test always False by CodePeer analysis, which is incorrect. Justify this false alarm with an appropriate pragma Annotate. gcc/ada/ * libgnat/s-imagei.adb (Image_Integer): Add justification. --- gcc/ada/libgnat/s-imagei.adb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc') diff --git a/gcc/ada/libgnat/s-imagei.adb b/gcc/ada/libgnat/s-imagei.adb index 8997e3c..c467777 100644 --- a/gcc/ada/libgnat/s-imagei.adb +++ b/gcc/ada/libgnat/s-imagei.adb @@ -177,6 +177,8 @@ package body System.Image_I is begin if V >= 0 then + pragma Annotate (CodePeer, False_Positive, "test always false", + "V can be positive"); S (1) := ' '; P := 1; pragma Assert (P < S'Last); -- cgit v1.1