Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Invalid format strings in ROMIO
From: Paul H. Hargrove (PHHargrove_at_[hidden])
Date: 2012-02-20 19:23:05


Both the v1.5 branch and trunk are getting lots of warnings from Clang
like the following:
> CC ad_coll_exch_new.lo
> ../../../../../../../../ompi/mca/io/romio/romio/adio/common/ad_coll_exch_new.c:51:28:
> warning: length modifier
> 'L' results in undefined behavior or no effect with 'd' conversion
> specifier [-Wformat]
> fprintf(stderr, "%d=(%Ld,%Ld)\n", i,
> flatlist_node_p->indices[i],

Manpages from both Linux (glibc) and FreeBSD (NOT glibc) agree that "L"
is only a valid length modifier for the floating-point conversion
specifiers.

Grepping both v1.5 and trunk show instances of "%Ld" in:

ompi/mca/io/romio/romio/adio/common/ad_write_nolock.c
ompi/mca/io/romio/romio/adio/common/ad_coll_build_req_new.c
ompi/mca/io/romio/romio/adio/common/ad_coll_exch_new.c
ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_write.c
ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c

Not sure how much one cares, but I am reporting on the off chance
somebody does want to fix this.

-Paul

-- 
Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group
HPC Research Department                   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900