fix parted of "missing for discarded return value"

MISRA C required that return value should be used, missing for it should
add "(void)" prefix before the function call.
Some function can be declared without return value to avoid this problem.

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2018-06-19 10:15:48 +08:00
committed by lijinxia
parent b8bdf171eb
commit 977c4b20b5
24 changed files with 46 additions and 63 deletions

View File

@@ -141,7 +141,7 @@ int hv_main(int cpu_id)
return 0;
}
int get_vmexit_profile(char *str, int str_max)
void get_vmexit_profile(char *str, int str_max)
{
int cpu, i, len, size = str_max;
@@ -173,5 +173,4 @@ int get_vmexit_profile(char *str, int str_max)
}
}
snprintf(str, size, "\r\n");
return 0;
}

View File

@@ -146,7 +146,7 @@ static void _get_req_info_(struct vhm_request *req, int *id, char *type,
}
}
int get_req_info(char *str, int str_max)
void get_req_info(char *str, int str_max)
{
int i, len, size = str_max, client_id;
union vhm_request_buffer *req_buf;
@@ -189,5 +189,4 @@ int get_req_info(char *str, int str_max)
}
spinlock_release(&vm_list_lock);
snprintf(str, size, "\r\n");
return 0;
}