ada: Refactor code to remove GNATcheck violation
commitc1fbfe5acbf02674c9fb411ffcccec5c6ed9a5eb
authorSheri Bernstein <bernstein@adacore.com>
Wed, 9 Aug 2023 16:04:31 +0000 (9 16:04 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 19 Oct 2023 14:35:22 +0000 (19 16:35 +0200)
tree7d177d0b01d67a8a17775a3c2901458ee17ae3ba
parent0f3c6348403ad1f6d077f6a09d914f5ec369f784
ada: Refactor code to remove GNATcheck violation

Rewrite for loop containing an exit (which violates GNATcheck
rule Exits_From_Conditional_Loops), to use a while loop
which contains the exit criteria in its condition.
Also, move special case of first time through loop, to come
before loop.

gcc/ada/

* libgnat/s-imagef.adb (Set_Image_Fixed): Refactor loop.
gcc/ada/libgnat/s-imagef.adb