Fix SPARK warning regarding nonvolatile functions
[libxhcidbg.git] / src / hw-dbc-transfer_rings.adb
index cb2eb7e032f87200f344782159afe7d1623b6f10..921b21a577af283567570fa92ec98c656556e52e 100644 (file)
@@ -203,17 +203,30 @@ is
          while Pointers (EP).Dequeue /= Current loop
             -- Finish transfers that have been skipped by the controller
             pragma Debug (Debug.Put_Line ("WARNING: Skipped TD."));
-            Transfer_Info.Finish
-              (DMA_Physical      => TRBs.Get_Parameter
-                                      (Rings (EP) (Pointers (EP).Dequeue)),
-               Status            => Controller_Error,
-               Remaining_Length  => Max_Bulk_Size);
+            declare
+               Cur_Address : Word64;
+            begin
+               TRBs.Get_Parameter
+                 (Data      => Rings (EP) (Pointers (EP).Dequeue),
+                  Parameter => Cur_Address);
+               Transfer_Info.Finish
+                 (DMA_Physical      => Cur_Address,
+                  Status            => Controller_Error,
+                  Remaining_Length  => Max_Bulk_Size);
+            end;
             Dequeue_TRB (EP);
          end loop;
-         Transfer_Info.Finish
-           (DMA_Physical      => TRBs.Get_Parameter (Rings (EP) (Current)),
-            Status            => Status,
-            Remaining_Length  => Remaining_Length);
+         declare
+            Cur_Address : Word64;
+         begin
+            TRBs.Get_Parameter
+              (Data      => Rings (EP) (Current),
+               Parameter => Cur_Address);
+            Transfer_Info.Finish
+              (DMA_Physical      => Cur_Address,
+               Status            => Status,
+               Remaining_Length  => Remaining_Length);
+         end;
          Dequeue_TRB (EP);
       end if;