Test: Fix build time error in MCUboot tests

Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Change-Id: I632140e1ac33da468d1e89601803b96744070c52
diff --git a/test/bl2/mcuboot/suites/integration/mcuboot_integration_tests.c b/test/bl2/mcuboot/suites/integration/mcuboot_integration_tests.c
index 603c8b3..da11fdd 100644
--- a/test/bl2/mcuboot/suites/integration/mcuboot_integration_tests.c
+++ b/test/bl2/mcuboot/suites/integration/mcuboot_integration_tests.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -239,14 +239,14 @@
         return;
     }
 
+    test_image_idx = (original_image_idx + 1) % 2;
+
     rc = read_image_header(original_image_idx, &hdr);
     if (rc) {
         TEST_FAIL("Failed to read image header");
         goto out;
     }
 
-    test_image_idx = (original_image_idx + 1) % 2;
-
     /* Increasing the version both causes the image to boot preferentially and
      * also invalidates the signature
      */
@@ -258,7 +258,7 @@
         goto out;
     }
 
-    rc = fih_int_decode(boot_go(&rsp));
+    (void)boot_go(&rsp);
     if (memcmp(rsp.br_hdr, &hdr, sizeof(struct image_header)) == 0) {
         TEST_FAIL("Invalid image boot succeeded");
         goto out;