Commit 592e2eae authored by William Gropp's avatar William Gropp
Browse files

[svn-r10651] Suppress variable unused warning when alloca used for local memory

parent 78d424d7
......@@ -23,6 +23,11 @@ extern "C" {
/* 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 @@ extern char *strdup( const char * );
/* 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 @@ if (pointer_) { \
(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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment