I found this warning in OMPI 1.5:

  CC     topology-x86.lo
topology-x86.c: In function 'look_proc':
topology-x86.c:189: warning: 'ways' may be used uninitialized in this function

On the hwloc trunk, the ways variable is not initialized, and there's an "if" 
block where one of the branches initializes it and the other does not.  Then 
below this conditional assignment, it has a comment:

      cache->size = linesize * linepart * ways * sets; /* FIXME: what if ways 
== -1 ? */

Which is somewhat amusing because ways was never set to -1.  :-)  

Should it be initialized to -1, or set to -1 in the "if" block right above it?  
And what to do if it is -1 in the cache->size assignment?

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to