Skip to content

Commit 84a24f2

Browse files
committed
Remove a cppcheck warning and update suppression file
1 parent 60b1ade commit 84a24f2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

PGate.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999-2010 Stephen Williams ([email protected])
2+
* Copyright (c) 1999-2013 Stephen Williams ([email protected])
33
*
44
* This source code is free software; you can redistribute it
55
* and/or modify it in source code form under the terms of the GNU
@@ -260,18 +260,16 @@ const char* PGBuiltin::gate_name() const
260260
}
261261

262262
PGModule::PGModule(perm_string type, perm_string name, list<PExpr*>*pins)
263-
: PGate(name, pins), bound_type_(0), overrides_(0), pins_(0),
263+
: PGate(name, pins), bound_type_(0), type_(type), overrides_(0), pins_(0),
264264
npins_(0), parms_(0), nparms_(0), msb_(0), lsb_(0)
265265
{
266-
type_ = type;
267266
}
268267

269268
PGModule::PGModule(perm_string type, perm_string name,
270269
named<PExpr*>*pins, unsigned npins)
271-
: PGate(name, 0), bound_type_(0), overrides_(0), pins_(pins),
270+
: PGate(name, 0), bound_type_(0), type_(type), overrides_(0), pins_(pins),
272271
npins_(npins), parms_(0), nparms_(0), msb_(0), lsb_(0)
273272
{
274-
type_ = type;
275273
}
276274

277275
PGModule::PGModule(Module*type, perm_string name)

cppcheck.sup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// These are correct and are used to find the base (zero) pin.
2-
thisSubtraction:netlist.h:4430
3-
thisSubtraction:netlist.h:4439
2+
thisSubtraction:netlist.h:4432
3+
thisSubtraction:netlist.h:4441

0 commit comments

Comments
 (0)