[MOAB-dev] r5296 - in MOAB/trunk: src/parallel tools/mbcoupler

jvporter at wisc.edu jvporter at wisc.edu
Fri Jan 6 16:03:24 CST 2012


Author: jvporter
Date: 2012-01-06 16:03:23 -0600 (Fri, 06 Jan 2012)
New Revision: 5296

Modified:
   MOAB/trunk/src/parallel/errmem.h
   MOAB/trunk/tools/mbcoupler/errmem.h
Log:
Fix errmem.h declarations


Modified: MOAB/trunk/src/parallel/errmem.h
===================================================================
--- MOAB/trunk/src/parallel/errmem.h	2012-01-06 21:54:46 UTC (rev 5295)
+++ MOAB/trunk/src/parallel/errmem.h	2012-01-06 22:03:23 UTC (rev 5296)
@@ -15,14 +15,10 @@
 
 #ifdef __GNUC__
 void fail(const char *fmt, ...) __attribute__ ((noreturn));
-
-static void buffer_init_(buffer *b, size_t size, const char *file)
-  __attribute__ ((unused));
-static void buffer_reserve_(buffer *b, size_t min, const char *file)
-  __attribute__ ((unused));
-static void buffer_free(buffer *b) __attribute__ ((unused));
+#define MAYBE_UNUSED __attribute__ ((unused))
 #else
 void fail(const char *fmt, ...);
+#define MAYBE_UNUSED
 #endif
 
 #if 0
@@ -51,11 +47,15 @@
   ((type*) srealloc((ptr),(count)*sizeof(type),__FILE__) )
 
 typedef struct { size_t size; void *ptr; } buffer;
+
+static void buffer_init_(buffer *b, size_t size, const char *file) MAYBE_UNUSED;
 static void buffer_init_(buffer *b, size_t size, const char *file)
 {
   b->size=size, b->ptr=smalloc(size,file);
 }
 static void buffer_reserve_(buffer *b, size_t min, const char *file)
+  MAYBE_UNUSED;
+static void buffer_reserve_(buffer *b, size_t min, const char *file)
 {
   size_t size = b->size;
   if(size<min) {
@@ -64,6 +64,7 @@
     b->ptr=srealloc(b->ptr,size,file);
   }
 }
+static void buffer_free(buffer *b) MAYBE_UNUSED;
 static void buffer_free(buffer *b) { free(b->ptr); }
 
 #define buffer_init(b,size) buffer_init_(b,size,__FILE__)

Modified: MOAB/trunk/tools/mbcoupler/errmem.h
===================================================================
--- MOAB/trunk/tools/mbcoupler/errmem.h	2012-01-06 21:54:46 UTC (rev 5295)
+++ MOAB/trunk/tools/mbcoupler/errmem.h	2012-01-06 22:03:23 UTC (rev 5296)
@@ -15,14 +15,10 @@


More information about the moab-dev mailing list