diff options
author | Bobby R. Bruce <bbruce@ucdavis.edu> | 2019-10-03 09:43:22 -0700 |
---|---|---|
committer | Bobby R. Bruce <bbruce@ucdavis.edu> | 2019-10-03 21:11:08 +0000 |
commit | 432afa21f56a1db5f68416387d9bbb05ae88e39e (patch) | |
tree | b1e33b15d6ba8f766b54700ae1ea4a774e869ea5 /src | |
parent | aa3b372a9598192a02e084b7ddf1cfa6426019fb (diff) | |
download | gem5-432afa21f56a1db5f68416387d9bbb05ae88e39e.tar.xz |
dev, misc: Fixing "may be used unitialized" compilation error
When compiling using "scons build/X86/base", "error: 'tx_queue_size'
may be used uninitialized in this function" is received (cc1plus:
all warnings treated as errors). tx_queue_size is now initialized
to zero to avoid this compilation error.
Change-Id: I0e2a4fd9ad6053c4c4124c83da9a7919778bcc52
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21399
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dev/net/etherlink.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dev/net/etherlink.cc b/src/dev/net/etherlink.cc index 448bb8856..e2506393e 100644 --- a/src/dev/net/etherlink.cc +++ b/src/dev/net/etherlink.cc @@ -242,7 +242,7 @@ EtherLink::Link::unserialize(const string &base, CheckpointIn &cp) parent->schedule(doneEvent, event_time); } - size_t tx_queue_size; + size_t tx_queue_size = 0; if (optParamIn(cp, base + ".tx_queue_size", tx_queue_size)) { for (size_t idx = 0; idx < tx_queue_size; ++idx) { Tick tick; |