[mpich-commits] r10651 - mpich2/trunk/src/include
gropp at mcs.anl.gov
gropp at mcs.anl.gov
Wed Nov 21 11:30:21 CST 2012
Author: gropp
Date: 2012-11-21 11:30:21 -0600 (Wed, 21 Nov 2012)
New Revision: 10651
Modified:
mpich2/trunk/src/include/mpimem.h
Log:
Suppress variable unused warning when alloca used for local memory
Modified: mpich2/trunk/src/include/mpimem.h
===================================================================
--- mpich2/trunk/src/include/mpimem.h 2012-11-21 17:29:17 UTC (rev 10650)
+++ mpich2/trunk/src/include/mpimem.h 2012-11-21 17:30:21 UTC (rev 10651)
@@ -23,6 +23,11 @@
/* ensure that we weren't included out of order */
#include "mpibase.h"
+/* Define attribute as empty if it has no definition */
+#ifndef ATTRIBUTE
+#define ATTRIBUTE(a)
+#endif
+
/* ------------------------------------------------------------------------- */
/* mpimem.h */
/* ------------------------------------------------------------------------- */
@@ -298,7 +303,7 @@
/* Define decl with a dummy definition to allow us to put a semi-colon
after the macro without causing the declaration block to end (restriction
imposed by C) */
-#define MPIU_CHKLMEM_DECL(n_) int dummy_
+#define MPIU_CHKLMEM_DECL(n_) int dummy_ ATTRIBUTE((unused))
#define MPIU_CHKLMEM_FREEALL()
#define MPIU_CHKLMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,stmt_) \
{pointer_ = (type_)alloca(nbytes_); \
@@ -429,11 +434,6 @@
(ptr_) = realloc_tmp_; \
} while (0)
-/* Define attribute as empty if it has no definition */
-#ifndef ATTRIBUTE
-#define ATTRIBUTE(a)
-#endif
-
#if defined(HAVE_STRNCASECMP)
# define MPIU_Strncasecmp strncasecmp
#elif defined(HAVE_STRNICMP)
More information about the commits
mailing list