Fix compiler warnings
Fix multiple compiler warnings including:
* Unused variables
* Missing header include
* Format string
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I94c8f95720a74835a2aacb7526fd94fc8ea005ce
diff --git a/components/common/uuid/uuid.c b/components/common/uuid/uuid.c
index 6f8b2ec..ab8a448 100644
--- a/components/common/uuid/uuid.c
+++ b/components/common/uuid/uuid.c
@@ -46,7 +46,7 @@
if (canonical_form[i] != '-') return 0;
}
else {
- if (!isxdigit(canonical_form[i])) return 0;
+ if (!isxdigit((int)canonical_form[i])) return 0;
}
}
}
diff --git a/components/rpc/mm_communicate/endpoint/sp/mm_communicate_call_ep.c b/components/rpc/mm_communicate/endpoint/sp/mm_communicate_call_ep.c
index 93aa0f4..9db9288 100644
--- a/components/rpc/mm_communicate/endpoint/sp/mm_communicate_call_ep.c
+++ b/components/rpc/mm_communicate/endpoint/sp/mm_communicate_call_ep.c
@@ -38,7 +38,6 @@
EFI_MM_COMMUNICATE_HEADER *header,
size_t buffer_size)
{
- rpc_status_t rpc_status = TS_RPC_ERROR_INTERNAL;
struct mm_service_call_req call_req = { 0 };
int32_t result = 0;
diff --git a/components/service/locator/service_name.c b/components/service/locator/service_name.c
index 0999787..440db9b 100644
--- a/components/service/locator/service_name.c
+++ b/components/service/locator/service_name.c
@@ -180,7 +180,7 @@
size_t digit_index = fields.instance_pos + fields.instance_len - 1 - i;
char digit = sn[digit_index];
- if (isdigit(digit)) {
+ if (isdigit((int)digit)) {
instance += ((digit - '0') * multiplier);
multiplier *= 10;
diff --git a/components/service/spm_test/sp.c b/components/service/spm_test/sp.c
index fa9c7ea..01cc7d2 100644
--- a/components/service/spm_test/sp.c
+++ b/components/service/spm_test/sp.c
@@ -281,10 +281,9 @@
sp_msg.args.args64[3] == 0xBC &&sp_msg.args.args64[4] == 0xCD) {
return_ok(msg);
} else {
- DMSG("Failed SP communication %x %x %x %x",
- sp_msg.args.args64[1],
- sp_msg.args.args64[2], sp_msg.args.args64[3],
- sp_msg.args.args64[4]);
+ DMSG("Failed SP communication %lx %lx %lx %lx",
+ sp_msg.args.args64[1], sp_msg.args.args64[2],
+ sp_msg.args.args64[3], sp_msg.args.args64[4]);
return_error(ERR_SP_COMMUNICATION, msg);
}
@@ -374,7 +373,6 @@
static void test_mem_relinquish(struct ffa_direct_msg *msg)
{
ffa_result res = FFA_OK;
- struct sp_memory_descriptor descriptor = {0};
uint64_t handle = 0;
uint16_t endpoint_id = 0;
struct sp_memory_transaction_flags flags = {
@@ -388,7 +386,6 @@
ffa_id_get(&endpoint_id);
handle = (uint64_t)msg->args.args64[1] |
(((uint64_t)msg->args.args64[2]) << 32);
- descriptor.tag = 0;
res = sp_memory_relinquish(handle, &endpoint_id, 1, &flags);
if (res) {