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.
This commit is contained in:
@@ -109,7 +109,7 @@ TsunamiCChip::read(PacketPtr pkt)
|
||||
panic("TSDEV_CC_MTR not implemeted\n");
|
||||
break;
|
||||
case TSDEV_CC_MISC:
|
||||
pkt->set((ipint << 8) & 0xF | (itint << 4) & 0xF |
|
||||
pkt->set(((ipint << 8) & 0xF) | ((itint << 4) & 0xF) |
|
||||
(pkt->req->getCpuNum() & 0x3));
|
||||
break;
|
||||
case TSDEV_CC_AAR0:
|
||||
|
||||
@@ -294,8 +294,7 @@ Terminal::out(char c)
|
||||
if (DTRACE(Terminal)) {
|
||||
static char last = '\0';
|
||||
|
||||
if (c != '\n' && c != '\r' ||
|
||||
last != '\n' && last != '\r') {
|
||||
if ((c != '\n' && c != '\r') || (last != '\n' && last != '\r')) {
|
||||
if (c == '\n' || c == '\r') {
|
||||
int size = linebuf.size();
|
||||
char *buffer = new char[size + 1];
|
||||
|
||||
Reference in New Issue
Block a user