Fix warnings from new version of clang tidy.

Change-Id: I2c85c8addd2bec83fa3796bb3ca8e87f5523a6fc
diff --git a/test/linux/linux.c b/test/linux/linux.c
index f0798e9..beffe8e 100644
--- a/test/linux/linux.c
+++ b/test/linux/linux.c
@@ -34,12 +34,12 @@
 
 static int finit_module(int fd, const char *param_values, int flags)
 {
-	return syscall(SYS_finit_module, fd, param_values, flags);
+	return (int)syscall(SYS_finit_module, fd, param_values, flags);
 }
 
 static int delete_module(const char *name, int flags)
 {
-	return syscall(SYS_delete_module, name, flags);
+	return (int)syscall(SYS_delete_module, name, flags);
 }
 
 static void insmod_hafnium(void)
diff --git a/test/vmapi/arch/aarch64/gicv3/gicv3.c b/test/vmapi/arch/aarch64/gicv3/gicv3.c
index 9c144b0..2027f8d 100644
--- a/test/vmapi/arch/aarch64/gicv3/gicv3.c
+++ b/test/vmapi/arch/aarch64/gicv3/gicv3.c
@@ -64,9 +64,9 @@
 {
 	/* Check that system register interface to GICv3 is enabled. */
 	uint32_t expected_sre =
-		1u << 2 | /* Disable IRQ bypass. */
-		1u << 1 | /* Disable FIQ bypass. */
-		1u << 0;  /* Enable system register interface to GICv3. */
+		1U << 2 | /* Disable IRQ bypass. */
+		1U << 1 | /* Disable FIQ bypass. */
+		1U << 0;  /* Enable system register interface to GICv3. */
 	EXPECT_EQ(read_msr(ICC_SRE_EL1), expected_sre);
 }
 
diff --git a/test/vmapi/arch/aarch64/gicv3/services/timer.c b/test/vmapi/arch/aarch64/gicv3/services/timer.c
index 063422a..4b9cfd1 100644
--- a/test/vmapi/arch/aarch64/gicv3/services/timer.c
+++ b/test/vmapi/arch/aarch64/gicv3/services/timer.c
@@ -59,15 +59,16 @@
 	arch_irq_enable();
 
 	for (;;) {
-		const char timer_wfi_message[] = "**** xxxxxxx";
 		uint8_t *message = (uint8_t *)SERVICE_RECV_BUFFER();
-		bool wfi, wfe, receive;
+		bool wfi;
+		bool wfe;
+		bool receive;
 		bool disable_interrupts;
 		uint32_t ticks;
 		struct spci_value ret = mailbox_receive_retry();
 
 		if (spci_msg_send_sender(ret) != HF_PRIMARY_VM_ID ||
-		    spci_msg_send_size(ret) != sizeof(timer_wfi_message)) {
+		    spci_msg_send_size(ret) != sizeof("**** xxxxxxx")) {
 			FAIL("Got unexpected message from VM %d, size %d.\n",
 			     spci_msg_send_sender(ret),
 			     spci_msg_send_size(ret));
diff --git a/test/vmapi/primary_with_secondaries/mailbox.c b/test/vmapi/primary_with_secondaries/mailbox.c
index 7dd47fe..934f741 100644
--- a/test/vmapi/primary_with_secondaries/mailbox.c
+++ b/test/vmapi/primary_with_secondaries/mailbox.c
@@ -44,7 +44,8 @@
  */
 static void next_permutation(char *s, size_t len)
 {
-	size_t i, j;
+	size_t i;
+	size_t j;
 
 	for (i = len - 2; i < len; i--) {
 		const char t = s[i];
diff --git a/test/vmapi/primary_with_secondaries/memory_sharing.c b/test/vmapi/primary_with_secondaries/memory_sharing.c
index dccc631..42f79d6 100644
--- a/test/vmapi/primary_with_secondaries/memory_sharing.c
+++ b/test/vmapi/primary_with_secondaries/memory_sharing.c
@@ -36,8 +36,8 @@
 	uint32_t vms[] = {SERVICE_VM0, SERVICE_VM1};
 	enum hf_share modes[] = {HF_MEMORY_GIVE, HF_MEMORY_LEND,
 				 HF_MEMORY_SHARE};
-	int i;
-	int j;
+	size_t i;
+	size_t j;
 
 	for (i = 0; i < ARRAY_SIZE(vms); ++i) {
 		for (j = 0; j < ARRAY_SIZE(modes); ++j) {
@@ -71,10 +71,10 @@
 		SPCI_MEMORY_OUTER_SHAREABLE, SPCI_MEMORY_INNER_SHAREABLE};
 	uint32_t vms[] = {HF_PRIMARY_VM_ID, SERVICE_VM0, SERVICE_VM1};
 
-	int i = 0;
-	int j = 0;
-	int k = 0;
-	int l = 0;
+	size_t i = 0;
+	size_t j = 0;
+	size_t k = 0;
+	size_t l = 0;
 
 	for (i = 0; i < ARRAY_SIZE(vms); ++i) {
 		for (j = 0; j < ARRAY_SIZE(lend_access); ++j) {
@@ -129,7 +129,7 @@
 {
 	uint32_t vms[] = {HF_PRIMARY_VM_ID, SERVICE_VM0, SERVICE_VM1};
 
-	int i;
+	size_t i;
 	for (i = 0; i < ARRAY_SIZE(vms); ++i) {
 		uint32_t msg_size;
 		/* Optionally skip one VM as the donate would succeed. */
@@ -158,8 +158,8 @@
 {
 	uint32_t vms[] = {HF_PRIMARY_VM_ID, SERVICE_VM0, SERVICE_VM1};
 
-	int i;
-	int j;
+	size_t i;
+	size_t j;
 	for (i = 0; i < ARRAY_SIZE(vms); ++i) {
 		for (j = 0; j < ARRAY_SIZE(vms); ++j) {
 			uint32_t msg_size = spci_memory_relinquish_init(