Fix a couple more cppcheck warnings

This commit is contained in:
Cary R 2021-01-06 22:38:48 -08:00
parent 57e87149e8
commit 4efbfa3e8f
2 changed files with 5 additions and 7 deletions

View File

@ -4,7 +4,7 @@
%{
/*
* Copyright (c) 1999-2017,2019 Stephen Williams (steve@icarus.com)
* Copyright (c) 1999-2021 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -177,8 +177,8 @@ static void make_bin_value(void)
cur = vecval;
while ((width < word_max) && (end > beg)) {
int aval = 0;
int bval = 0;
PLI_UINT32 aval = 0;
PLI_UINT32 bval = 0;
end -= 1;
if (*end == '_') continue;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2020 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2021 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -333,6 +333,7 @@ vpiHandle vpip_make_string_param(char*name, char*text,
inline __vpiBinaryConst::__vpiBinaryConst()
signed_flag(0), sized_flag(0)
{ }
int __vpiBinaryConst::get_type_code(void) const
@ -404,9 +405,6 @@ vpiHandle vpip_make_binary_const(unsigned wid, const char*bits)
{
struct __vpiBinaryConst*obj = new __vpiBinaryConst;
obj->signed_flag = 0;
obj->sized_flag = 0;
const char*bp = bits;
if (*bp == 's') {
bp += 1;