scanalysis: fix warning
authorBrian Norris <banorris@uci.edu>
Mon, 15 Apr 2013 04:34:49 +0000 (21:34 -0700)
committerBrian Norris <banorris@uci.edu>
Mon, 15 Apr 2013 04:34:49 +0000 (21:34 -0700)
canalysis.cc: In member function ‘bool SCAnalysis::processRead(ModelAction*, ClockVector*)’:
scanalysis.cc:162:78: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]

scanalysis.cc

index 2bc275d..288aa49 100644 (file)
@@ -159,7 +159,7 @@ bool SCAnalysis::processRead(ModelAction *read, ClockVector *cv) {
        /* Merge in the clock vector from the write */
        const ModelAction *write=read->get_reads_from();
        ClockVector *writecv=cvmap->get(write);
-       changed|= ( writecv == NULL || merge(cv, read, writecv) && (*read < *write));
+       changed |= writecv == NULL || (merge(cv, read, writecv) && (*read < *write));
 
        for(int i=0;i<=maxthreads;i++) {
                thread_id_t tid=int_to_id(i);