diff options
author | Nathan Binkert <nate@binkert.org> | 2008-09-27 21:03:49 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-09-27 21:03:49 -0700 |
commit | 80d9be86e616e819cc3c9a0bbc8a42a5beb41247 (patch) | |
tree | 311a579c3be054b5dfb603ac6040af3027d416a2 /src/base/stats | |
parent | cf7ddd8e8ac92cf5b90cd89a028414dd782c645a (diff) | |
download | gem5-80d9be86e616e819cc3c9a0bbc8a42a5beb41247.tar.xz |
gcc: Add extra parens to quell warnings.
Even though we're not incorrect about operator precedence, let's add
some parens in some particularly confusing places to placate GCC 4.3
so that we don't have to turn the warning off. Agreed that this is a
bit of a pain for those users who get the order of operations correct,
but it is likely to prevent bugs in certain cases.
Diffstat (limited to 'src/base/stats')
-rw-r--r-- | src/base/stats/text.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc index a018c4837..6f40d92c8 100644 --- a/src/base/stats/text.cc +++ b/src/base/stats/text.cc @@ -191,8 +191,8 @@ struct ScalarPrint void ScalarPrint::operator()(ostream &stream) const { - if (flags & nozero && value == 0.0 || - flags & nonan && isnan(value)) + if ((flags & nozero && value == 0.0) || + (flags & nonan && isnan(value))) return; stringstream pdfstr, cdfstr; @@ -474,8 +474,8 @@ DistPrint::operator()(ostream &stream) const print.flags = flags | __substat; for (int i = 0; i < size; ++i) { - if (flags & nozero && vec[i] == 0.0 || - flags & nonan && isnan(vec[i])) + if ((flags & nozero && vec[i] == 0.0) || + (flags & nonan && isnan(vec[i]))) continue; _min = i * bucket_size + min; |