summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-11-24 09:03:38 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2014-11-24 09:03:38 -0500
commitd66b14ca61bec95a4049e5aae468904395055efd (patch)
tree6ddaf6bd4a792f0fe3125d57dae95fb9099dd7b7 /src/base
parent1f539f13c32ad5a9187d56a098d4c857639b0e05 (diff)
downloadgem5-d66b14ca61bec95a4049e5aae468904395055efd.tar.xz
misc: Another round of static analysis fixups
Mostly addressing uninitialised members.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/bigint.hh9
-rw-r--r--src/base/remote_gdb.cc5
2 files changed, 6 insertions, 8 deletions
diff --git a/src/base/bigint.hh b/src/base/bigint.hh
index a4e8738d3..2fa441a73 100644
--- a/src/base/bigint.hh
+++ b/src/base/bigint.hh
@@ -39,13 +39,10 @@
struct m5_twin64_t {
uint64_t a;
uint64_t b;
- m5_twin64_t()
+ m5_twin64_t() : a(0), b(0)
+ {}
+ m5_twin64_t(const uint64_t x) : a(x), b(x)
{}
- m5_twin64_t(const uint64_t x)
- {
- a = x;
- b = x;
- }
inline m5_twin64_t& operator=(const uint64_t x)
{
a = x;
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index 49b7ce50d..ead8db9ae 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -658,12 +658,13 @@ BaseRemoteGDB::trap(int type)
* After the debugger is "active" (connected) it will be
* waiting for a "signaled" message from us.
*/
- if (!active)
+ if (!active) {
active = true;
- else
+ } else {
// Tell remote host that an exception has occurred.
snprintf((char *)buffer, bufferSize, "S%02x", type);
send(buffer);
+ }
// Stick frame regs into our reg cache.
getregs();