gcc/ada/
* atree.adb (Get_32_Bit_Field): Declare result before returning.
function Cast is new
Unchecked_Conversion (Field_Size_32_Bit, Field_Type);
+
+ Result : constant Field_Type := Cast (Get_32_Bit_Val (N, Offset));
+ -- Note: declaring Result here instead of directly returning
+ -- Cast (...) helps CodePeer understand that there are no issues
+ -- around uninitialized variables.
begin
- return Cast (Get_32_Bit_Val (N, Offset));
+ return Result;
end Get_32_Bit_Field;
function Get_32_Bit_Field_With_Default