HV:treewide:fix rest of violations related parameter changed

Misra c required parameter should not changed in the scope
of function,use local variable to replace it.

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Huihuang Shi
2018-07-27 15:08:24 +08:00
committed by lijinxia
parent 42c77e4cf4
commit 496e40072e
8 changed files with 35 additions and 21 deletions

View File

@@ -6,10 +6,11 @@
#include <hv_lib.h>
static int do_udiv32(uint32_t dividend_arg, uint32_t divisor,
static int do_udiv32(uint32_t dividend_arg, uint32_t divisor_arg,
struct udiv_result *res)
{
uint32_t dividend = dividend_arg;
uint32_t divisor = divisor_arg;
uint32_t mask;
/* dividend is always greater than or equal to the divisor. Neither
* divisor nor dividend are 0. Thus: * clz(dividend) and clz(divisor)

View File

@@ -281,8 +281,9 @@ static int format_number(struct print_param *param)
}
static int print_pow2(struct print_param *param,
uint64_t v, uint32_t shift)
uint64_t v_arg, uint32_t shift)
{
uint64_t v = v_arg;
/* max buffer required for octal representation of unsigned long long */
char digitbuff[22];
/* Insert position for the next character+1 */