Remove some cppcheck warnings in the main and vvp diretory.
This commit is contained in:
parent
cb9e1ee37e
commit
29ade50cab
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2011 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2012 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
|
||||
|
|
@ -1006,8 +1006,6 @@ NetNet* NetESelect::synthesize(Design *des, NetScope*scope, NetExpr*root)
|
|||
|
||||
if (sub == 0) return 0;
|
||||
|
||||
NetNet*off = 0;
|
||||
|
||||
// Detect the special case that there is a base expression and
|
||||
// it is constant. In this case we can generate fixed part selects.
|
||||
if (NetEConst*base_const = dynamic_cast<NetEConst*>(base_)) {
|
||||
|
|
@ -1106,7 +1104,7 @@ NetNet* NetESelect::synthesize(Design *des, NetScope*scope, NetExpr*root)
|
|||
// actual part/bit select. Generate a NetPartSelect object to
|
||||
// do the work, and replace "sub" with the selected output.
|
||||
if (base_ != 0) {
|
||||
off = base_->synthesize(des, scope, root);
|
||||
NetNet*off = base_->synthesize(des, scope, root);
|
||||
|
||||
NetPartSelect*sel = new NetPartSelect(sub, off, expr_width(),
|
||||
base_->has_sign());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2012 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
|
||||
|
|
@ -35,7 +35,6 @@ bool Nexus::drivers_constant() const
|
|||
return true;
|
||||
|
||||
for (const Link*cur = first_nlink() ; cur ; cur = cur->next_nlink()) {
|
||||
const NetNet*sig;
|
||||
Link::DIR cur_dir;
|
||||
|
||||
cur_dir = cur->get_dir();
|
||||
|
|
@ -56,6 +55,7 @@ bool Nexus::drivers_constant() const
|
|||
outside world. */
|
||||
|
||||
if (cur_dir == Link::PASSIVE) {
|
||||
const NetNet*sig;
|
||||
|
||||
const NetPins*obj = cur->get_obj();
|
||||
const NetObj*as_obj = dynamic_cast<const NetObj*>(obj);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2011 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2012 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
|
||||
|
|
@ -46,7 +46,7 @@ void vvp_arith_::dispatch_operand_(vvp_net_ptr_t ptr, vvp_vector4_t bit)
|
|||
op_b_ = bit;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported port type %d.\n", port);
|
||||
fprintf(stderr, "Unsupported port type %u.\n", port);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1517,7 +1517,7 @@ void compile_resolver(char*label, char*type, unsigned argc, struct symb_s*argv)
|
|||
} else {
|
||||
fprintf(stderr, "invalid resolver type: %s\n", type);
|
||||
compile_errors += 1;
|
||||
free(net);
|
||||
delete net;
|
||||
}
|
||||
|
||||
if (core) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue