Pavan --

Can you send a copy of your stderr? I don't get the warnings about fgets output not getting checked.

Thanks!


On Oct 21, 2009, at 9:39 AM, hwloc wrote:

#16: hwloc build fails with strict compiler flags
------------------- +--------------------------------------------------------
Reporter:  balaji  |        Owner:
    Type:  defect  |       Status:  closed
Priority:  normal  |    Milestone:  v0.9.1
 Version:          |   Resolution:  fixed
Keywords:          |
------------------- +--------------------------------------------------------

Comment(by balaji):

The vsnprintf warnings occur because snprintf and vsnprintf are present
 only in C99, not C89. There are a few solutions possible:

1. Check in configure to (i) add a prototype for snprintf/vsnprintf where needed and (ii) add an alternative implementation for them for platforms
 that don't provide them.

 2. An alternative (simpler) solution is to include MPL
(https://svn.mcs.anl.gov/repos/mpi/mpich2/trunk/src/mpl) into hwloc and
 just use MPL_snprintf and friends everywhere.

3. Check if snprintf/vsnprintf exist in configure and abort if they don't. Other libraries relying on hwloc can see this error and not build hwloc in
 those cases.

Not sure if either approach is acceptable for you guys, so I'm leaving
 this ticket as closed. Please reopen if appropriate.

Btw, there are some other warnings too because the return values of fgets
 and fscanf are not checked. But those are relatively minor, IMHO.

--
Ticket URL: <https://svn.open-mpi.org/trac/hwloc/ticket/16#comment:3>
hwloc <http://www.open-mpi.org/projects/hwloc/>
Portable hardware locality



--
Jeff Squyres
jsquy...@cisco.com

Reply via email to