On 03/25/2014 04:01 PM, Becky Ligon wrote:
Which compiler are you using and at what version?
clang-3.4. The flags are lengthy, because it's part of mpich's --enable-strict:
-O2 -Wall -Wextra -Wno-missing-field-initializers -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL -Wno-unused-parameter -Wno-unused-label -Wshadow -Wmissing-declarations -Wno-long-long -Wundef -Wno-endif-labels -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-sign-compare -Wold-style-definition -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wnested-externs -Winvalid-pch -Wno-pointer-sign -Wvariadic-macros -Wno-format-zero-length -Wno-type-limits -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112L -std=c99 -g -O0 -DFORTRANUNDERSCORE -I/home/robl/work/soft/orangefs-trunk/include -O2 -Wall -Wextra -Wno-missing-field-initializers -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL -Wno-unused-parameter -Wno-unused-label -Wshadow -Wmissing-declarations -Wno-long-long -Wundef -Wno-endif-labels -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-sign-compare -Wold-style-definition -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wnested-externs -Winvalid-pch -Wno-pointer-sign -Wvariadic-macros -Wno-format-zero-length -Wno-type-limits -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112L -std=c99 -g -O0 -DFORTRANUNDERSCORE -I/home/robl/work/soft/orangefs-trunk/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_ROMIOCONF_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
Also, my patch missed one more declaration. Updated version attached. ==rob
Becky On Tue, Mar 25, 2014 at 3:53 PM, Rob Latham <r...@mcs.anl.gov <mailto:r...@mcs.anl.gov>> wrote: On 03/25/2014 02:49 PM, Becky Ligon wrote: That structure is used just for the kernel module. Did you configure OrangeFS with-kernel? If so, this may be why you are getting this error? Which version of OrangeFS are you using? OrangeFS trunk (old habits, I guess), configured like this: /home/robl/work/pvfs2-__orangefs/configure \ --prefix=/home/robl/work/soft/__orangefs-trunk \ --disable-server --enable-shared then to be precise, the I've configured MPICH to build PVFS2. Warnings look like this: In file included from /home/robl/work/mpich/src/mpi/__romio/mpi-io/close.c:8: In file included from /home/robl/work/mpich/src/mpi/__romio/mpi-io/mpioimpl.h:15: In file included from /home/robl/work/mpich/src/mpi/__romio/adio/include/adio.h:442: In file included from /home/robl/work/mpich/src/mpi/__romio/adio/include/adioi.h:__114: In file included from /home/robl/work/soft/orangefs-__trunk/include/pvfs2.h:23: /home/robl/work/soft/orangefs-__trunk/include/pvfs2-debug.h:__129:25: warning: variable 's_keyword_mask_map' is not needed and will not be emitted [-Wunneeded-internal-__declaration] static __keyword_mask_t s_keyword_mask_map[] = ^ /home/robl/work/soft/orangefs-__trunk/include/pvfs2-debug.h:__249:25: warning: variable 's_kmod_keyword_mask_map' is not needed and will not be emitted [-Wunneeded-internal-__declaration] static __keyword_mask_t s_kmod_keyword_mask_map[] = ^ 2 warnings generated. pvfs2.h picks up pvfs2-debug.h, and pvfs2-debug.h declares a data structure that, as you point out, no userspace code uses. ==rob Becky On Tue, Mar 25, 2014 at 3:45 PM, Rob Latham <r...@mcs.anl.gov <mailto:r...@mcs.anl.gov> <mailto:r...@mcs.anl.gov <mailto:r...@mcs.anl.gov>>> wrote: When I build ROMIO with pvfs2 support, i get lots of warnings about warning: variable 's_kmod_keyword_mask_map' is not needed and will not be emitted. The attached patch making that structure 'const' appears to make clang happier, and seems apropriate for this read-only data structure. ==robb -- Rob Latham Mathematics and Computer Science Division Argonne National Lab, IL USA _________________________________________________ Pvfs2-developers mailing list Pvfs2-developers@beowulf-__underground.org <mailto:Pvfs2-developers@beowulf-underground.org> <mailto:Pvfs2-developers@__beowulf-underground.org <mailto:Pvfs2-developers@beowulf-underground.org>> http://www.beowulf-__underground.org/mailman/__listinfo/pvfs2-developers <http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers> -- Rob Latham Mathematics and Computer Science Division Argonne National Lab, IL USA
-- Rob Latham Mathematics and Computer Science Division Argonne National Lab, IL USA
Index: include/pvfs2-debug.h =================================================================== --- include/pvfs2-debug.h (revision 10746) +++ include/pvfs2-debug.h (working copy) @@ -126,7 +126,7 @@ #define __DEBUG_ALL ((uint64_t) -1) /* map all config keywords to pvfs2 debug masks here */ -static __keyword_mask_t s_keyword_mask_map[] = +static const __keyword_mask_t s_keyword_mask_map[] = { /* Log trove debugging info. Same as 'trove'.*/ { "storage", GOSSIP_TROVE_DEBUG }, @@ -246,7 +246,7 @@ #undef __DEBUG_ALL /* map all kmod keywords to kmod debug masks here */ -static __keyword_mask_t s_kmod_keyword_mask_map[] = +static const __keyword_mask_t s_kmod_keyword_mask_map[] = { {"super" , GOSSIP_SUPER_DEBUG}, {"inode" , GOSSIP_INODE_DEBUG}, Index: src/common/misc/pvfs2-debug.c =================================================================== --- src/common/misc/pvfs2-debug.c (revision 10746) +++ src/common/misc/pvfs2-debug.c (working copy) @@ -12,7 +12,7 @@ #include "pvfs2-internal.h" #include "pvfs2-debug.h" -static uint64_t debug_to_mask(__keyword_mask_t *mask_map, +static uint64_t debug_to_mask(const __keyword_mask_t *mask_map, int num_mask_map, const char *event_logging) { uint64_t mask = 0;
_______________________________________________ Pvfs2-developers mailing list Pvfs2-developers@beowulf-underground.org http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers