Remove some cppcheck warnings.
This patch modifies the code to remove some more cppcheck warnings.
This commit is contained in:
parent
44b08a4630
commit
86653ddff9
|
|
@ -34,6 +34,9 @@ Module::Module(perm_string n)
|
|||
is_cell = false;
|
||||
uc_drive = UCD_NONE;
|
||||
timescale_warn_done = false;
|
||||
time_unit = 0;
|
||||
time_precision = 0;
|
||||
time_from_timescale = false;
|
||||
}
|
||||
|
||||
Module::~Module()
|
||||
|
|
|
|||
2
PGate.cc
2
PGate.cc
|
|
@ -288,7 +288,7 @@ void PGModule::set_range(PExpr*msb, PExpr*lsb)
|
|||
lsb_ = lsb;
|
||||
}
|
||||
|
||||
perm_string PGModule::get_type()
|
||||
perm_string PGModule::get_type() const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
|
|
|||
4
PGate.h
4
PGate.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __PGate_H
|
||||
#define __PGate_H
|
||||
/*
|
||||
* Copyright (c) 1998-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2010 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
|
||||
|
|
@ -215,7 +215,7 @@ class PGModule : public PGate {
|
|||
|
||||
// This returns the module name of this module. It is a
|
||||
// permallocated string.
|
||||
perm_string get_type();
|
||||
perm_string get_type() const;
|
||||
|
||||
private:
|
||||
perm_string type_;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2006,2009,2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2006-2010 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
|
||||
|
|
@ -25,6 +25,10 @@ PGenerate::PGenerate(LexicalScope*parent, unsigned id)
|
|||
: LexicalScope(parent), id_number(id)
|
||||
{
|
||||
direct_nested_ = false;
|
||||
scheme_type = GS_NONE;
|
||||
loop_init = 0;
|
||||
loop_test = 0;
|
||||
loop_step = 0;
|
||||
}
|
||||
|
||||
PGenerate::~PGenerate()
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ NetAssign_::NetAssign_(NetNet*s)
|
|||
lwid_ = sig_->vector_width();
|
||||
sig_->incr_lref();
|
||||
more = 0;
|
||||
turn_sig_to_wire_on_release_ = false;
|
||||
}
|
||||
|
||||
NetAssign_::~NetAssign_()
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ Design:: Design()
|
|||
des_precision_ = 0;
|
||||
nodes_functor_cur_ = 0;
|
||||
nodes_functor_nxt_ = 0;
|
||||
des_delay_sel_ = Design::TYP;
|
||||
}
|
||||
|
||||
Design::~Design()
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ NetFuncDef* NetScope::func_def()
|
|||
return func_;
|
||||
}
|
||||
|
||||
bool NetScope::in_func()
|
||||
bool NetScope::in_func() const
|
||||
{
|
||||
return (type_ == FUNC) ? true : false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ class NetScope : public Attrib {
|
|||
unsigned get_lineno() const { return lineno_; };
|
||||
unsigned get_def_lineno() const { return def_lineno_; };
|
||||
|
||||
bool in_func();
|
||||
bool in_func() const;
|
||||
/* Is the task or function automatic. */
|
||||
void is_auto(bool is_auto__) { is_auto_ = is_auto__; };
|
||||
bool is_auto() const { return is_auto_; };
|
||||
|
|
|
|||
2
pform.h
2
pform.h
|
|
@ -102,7 +102,7 @@ struct net_decl_assign_t {
|
|||
/* The lgate is gate instantiation information. */
|
||||
struct lgate {
|
||||
lgate(int =0)
|
||||
: parms(0), parms_by_name(0), lineno(0)
|
||||
: parms(0), parms_by_name(0), file(NULL), lineno(0)
|
||||
{ range[0] = 0;
|
||||
range[1] = 0;
|
||||
}
|
||||
|
|
|
|||
2
t-dll.cc
2
t-dll.cc
|
|
@ -2120,7 +2120,7 @@ bool dll_target::replicate(const NetReplicate*net)
|
|||
* The assignment l-values are captured by the assignment statements
|
||||
* themselves in the process handling.
|
||||
*/
|
||||
void dll_target::net_assign(const NetAssign_*)
|
||||
void dll_target::net_assign(const NetAssign_*) const
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
2
t-dll.h
2
t-dll.h
|
|
@ -80,7 +80,7 @@ struct dll_target : public target_t, public expr_scan_t {
|
|||
bool concat(const NetConcat*);
|
||||
bool part_select(const NetPartSelect*);
|
||||
bool replicate(const NetReplicate*);
|
||||
void net_assign(const NetAssign_*);
|
||||
void net_assign(const NetAssign_*) const;
|
||||
bool net_sysfunction(const NetSysFunc*);
|
||||
bool net_function(const NetUserFunc*);
|
||||
bool net_const(const NetConst*);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class vhdl_var_ref : public vhdl_expr {
|
|||
public:
|
||||
vhdl_var_ref(const string& name, const vhdl_type *type,
|
||||
vhdl_expr *slice = NULL)
|
||||
: vhdl_expr(type), name_(name), slice_(slice) {}
|
||||
: vhdl_expr(type), name_(name), slice_(slice), slice_width_(0) {}
|
||||
~vhdl_var_ref();
|
||||
|
||||
void emit(std::ostream &of, int level) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue