https://bugzilla.redhat.com/show_bug.cgi?id=1367598



--- Comment #1 from Paulo Andrade <paulo.cesar.pereira.de.andr...@gmail.com> ---
  It is not required to have:
BuildRequires: gcc

---
  This looks suspecting, as it means it will loop only once:
./src/randschr.c:238:10: warning: this 'if' clause does not guard...
[-Wmisleading-indentation]
          if ( hOrder % primeList[i] == 0 )
          ^~
./src/randschr.c:240:13: note: ...this statement, but the latter is
misleadingly indented as if it is guarded by the 'if'
             break;
             ^~~~~
code is:
      for ( i = 0 ; primeList[i] != 0 ; ++i ) {
         if ( hOrder % primeList[i] == 0 )
            raisePermToPower( h, hOrder / primeList[i]);
            break;
      }
and the data is:
guava-3.13.1/src/leon/src/primes.c:Unsigned primeList[] =
{2,3,5,7,9,11,13,17,19,23,29,31,37,41,43,47,53,59, ... 0};

---
  || and && have different precedence, so this code is also suspecting:
./src/randschr.c:391:43: warning: suggest parentheses around '&&' within '||'
[-Wparentheses]
                   lowestOrder == curOrder && levelLowestOrder > finalLevel) )
{
                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
code is:
            if ( nonInvolRejectCount > 0 &&
(...||           (lowestOrder < (curOrder = permOrder(h)) ||
 ...&&...)       lowestOrder == curOrder && levelLowestOrder > finalLevel) ) {

---
  Another case of suspicious code:
./src/ccent.c: In function 'nextBasePointEltCent':
./src/ccent.c:90:24: warning: suggest parentheses around '+' inside '<<'
[-Wparentheses]
             priority = 2000000000ul - (unsigned long) MIN(cycleLen[pt],1000)
<< 20
                                                                               
 ~~
                        + cSize;
                        ^~~~~~~

---
  The package appears in good shape, but while I checked all other
compiler warnings, and they appear to just warn about improper
indentation or somewhat uncommon coding practive, the above warnings
may be valid, so, I would like some comment about it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/package-review@lists.fedoraproject.org

Reply via email to