Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -gnatjw warnings #30

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/assembly/linux/linux_example.assembly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ prepreamble: |
pragma Unreferenced (Start_Up);
pragma Elaborate_All (Start_Up);
preamble: |
Dividers : aliased Component.Tick_Divider.Divider_Array_Type := (1 => 5, 2 => 10, 3 => 1);
Dividers : aliased Component.Tick_Divider.Divider_Array_Type := [1 => 5, 2 => 10, 3 => 1];
########################################
components:
########################################
Expand Down
2 changes: 1 addition & 1 deletion src/assembly/linux/memory_map.ads
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package Memory_Map is

-- Define parameter store. This is declared as static memory address for linux assembly, but for
-- an embedded assembly might reference a static address in a non-volatile memory region like MRAM.
Parameter_Store_Bytes : aliased Basic_Types.Byte_Array := (0 .. Linux_Example_Parameter_Table.Parameter_Table_Size_In_Bytes - 1 => <>);
Parameter_Store_Bytes : aliased Basic_Types.Byte_Array := [0 .. Linux_Example_Parameter_Table.Parameter_Table_Size_In_Bytes - 1 => <>];
Parameter_Store_Bytes_Access : constant Basic_Types.Byte_Array_Access := Parameter_Store_Bytes'Access;

end Memory_Map;
4 changes: 2 additions & 2 deletions src/assembly/pico/pico_example.assembly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ with:
- Pico_Example_Fault_Responses
- Ccsds_Space_Packet
preamble: |
Dividers : aliased Component.Tick_Divider.Divider_Array_Type := (1 => 5, 2 => 10, 3 => 1);
Dividers : aliased Component.Tick_Divider.Divider_Array_Type := [1 => 5, 2 => 10, 3 => 1];
########################################
components:
########################################
Expand Down Expand Up @@ -101,7 +101,7 @@ components:
- "Event_Id_Start => Pico_Example_Events.Minimum_Event_Id"
- "Event_Id_Stop => Pico_Example_Events.Maximum_Event_Id"
- "Event_Limit_Persistence => 5"
- "Event_Disable_List => (0 => Pico_Example_Events.Ccsds_Serial_Interface_Instance_Have_Not_Seen_Sync_Pattern)"
- "Event_Disable_List => [0 => Pico_Example_Events.Ccsds_Serial_Interface_Instance_Have_Not_Seen_Sync_Pattern]"
- type: Event_Packetizer
description: This component gathers events and packetizes them for downlink.
init:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ package body Component.Oscillator.Implementation.Tester is
Param_Update : Parameter_Update.T := (
Operation => Fetch,
Status => Success,
Param => (Header => (Id => Id, Buffer_Length => 0), Buffer => (others => 0))
Param => (Header => (Id => Id, Buffer_Length => 0), Buffer => [others => 0])
);
begin
-- Set the ID to fetch:
Expand All @@ -234,7 +234,7 @@ package body Component.Oscillator.Implementation.Tester is
Param_Update : Parameter_Update.T := (
Operation => Update,
Status => Success,
Param => ((0, 0), (others => 0))
Param => ((0, 0), [others => 0])
);
begin
Self.Parameter_Update_T_Provide (Param_Update);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ package Component.Parameter_Manager.Implementation.Tester is
Expect_Command_T_Send_Dropped : Boolean := False;
Command_T_Send_Dropped_Count : Natural := 0;
-- Memory regions for simulation:
Default : Basic_Types.Byte_Array (0 .. 99) := (others => 14);
Working : Basic_Types.Byte_Array (0 .. 99) := (others => 14);
Default : Basic_Types.Byte_Array (0 .. 99) := [others => 14];
Working : Basic_Types.Byte_Array (0 .. 99) := [others => 14];
end record;
type Instance_Access is access all Instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ package body Parameter_Manager_Tests.Implementation is
Task_Exit : Boolean_Access
);

Sim_Bytes : aliased Basic_Types.Byte_Array := (0 .. 99 => 12);
Sim_Bytes_2 : aliased Basic_Types.Byte_Array := (0 .. 99 => 11);
Sim_Bytes : aliased Basic_Types.Byte_Array := [0 .. 99 => 12];
Sim_Bytes_2 : aliased Basic_Types.Byte_Array := [0 .. 99 => 11];

task body Simulator_Task is
Ignore : Natural;
Expand Down Expand Up @@ -483,7 +483,7 @@ package body Parameter_Manager_Tests.Implementation is
-- Make sure some events were thrown:
Natural_Assert.Eq (T.Event_T_Recv_Sync_History.Get_Count, 1);
Natural_Assert.Eq (T.Invalid_Command_Received_History.Get_Count, 1);
Invalid_Command_Info_Assert.Eq (T.Invalid_Command_Received_History.Get (1), (Id => T.Commands.Get_Copy_Parameter_Table_Id, Errant_Field_Number => Interfaces.Unsigned_32'Last, Errant_Field => (0, 0, 0, 0, 0, 0, 0, 22)));
Invalid_Command_Info_Assert.Eq (T.Invalid_Command_Received_History.Get (1), (Id => T.Commands.Get_Copy_Parameter_Table_Id, Errant_Field_Number => Interfaces.Unsigned_32'Last, Errant_Field => [0, 0, 0, 0, 0, 0, 0, 22]));
end Test_Invalid_Command;

end Parameter_Manager_Tests.Implementation;
8 changes: 4 additions & 4 deletions src/last_chance_handler/pico/last_chance_handler.adb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ package body Last_Chance_Handler is

-- Exception data packed record:
Packed_Exception_Data : Packed_Exception_Occurrence.T := (
Exception_Name => (others => 0),
Exception_Message => (others => 0),
Exception_Name => [others => 0],
Exception_Message => [others => 0],
Stack_Trace_Depth => 0,
Stack_Trace => (others => (Address => To_Address (Integer_Address (0))))
Stack_Trace => [others => (Address => To_Address (Integer_Address (0)))]
);
begin
-- Copy the name into the first section.
Expand Down Expand Up @@ -152,7 +152,7 @@ package body Last_Chance_Handler is
Sequence_Count => 0,
Packet_Length => Unsigned_16 (Sys_Time.Size_In_Bytes + Packed_Exception_Data_Bytes'Length + Crc_16_Type'Length - 1)
),
Data => (others => 0)
Data => [others => 0]
);
-- Sequence count:
Cnt : Ccsds_Primary_Header.Ccsds_Sequence_Count_Type := 0;
Expand Down
2 changes: 1 addition & 1 deletion src/pico_util/uart/diagnostic_uart.adb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package body Diagnostic_Uart is
end Get;

procedure Put (B : in Basic_Types.Byte) is
Bytes : constant Basic_Types.Byte_Array (0 .. 0) := (0 => B);
Bytes : constant Basic_Types.Byte_Array (0 .. 0) := [0 => B];
begin
Pico_Uart.Send_Byte_Array (To_Send => Bytes);
end Put;
Expand Down