mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
hv:Fix unused var value on all paths
MISRAC checks whether a variable is assigned a value not used in all branches of a program. Var value which is unused on all paths can be removed with a consequent improvement in the readability and efficiency of the code. This patch is used to fix these violations. Tracked-On: #861 Signed-off-by: Junjun Shan <junjun.shan@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -450,7 +450,7 @@ void shell_init(void)
|
||||
#define MAX_INDENT_LEN 16
|
||||
static int shell_cmd_help(__unused int argc, __unused char **argv)
|
||||
{
|
||||
int spaces = 0;
|
||||
int spaces;
|
||||
struct shell_cmd *p_cmd = NULL;
|
||||
char space_buf[MAX_INDENT_LEN + 1];
|
||||
|
||||
@@ -679,7 +679,7 @@ static int shell_dumpmem(int argc, char **argv)
|
||||
{
|
||||
uint64_t addr;
|
||||
uint64_t *ptr;
|
||||
uint32_t i, length = 32U;
|
||||
uint32_t i, length;
|
||||
char temp_str[MAX_STR_SIZE];
|
||||
|
||||
/* User input invalidation */
|
||||
|
||||
Reference in New Issue
Block a user