[svn-r24803] Description:

Rename GCC_DIAG_OFF/ON macros to H5_GCC_DIAG_OFF/ON and move from
src/H5private.h to src/H5public.h.  Wrap typedef of hsize_t and hssize_t
in DIAG_OFF(long-long) macros.

    Clean up a bunch of "macro '-' is unused" warnings.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/gcc 4.8.2, C++, FORTRAN, parallel
    (too minor to require h5committest)
This commit is contained in:
Quincey Koziol 2014-03-15 22:13:52 -05:00
parent f5689224b5
commit 288c7760a4
22 changed files with 103 additions and 240 deletions

View File

@ -17,12 +17,6 @@
#include "gif.h"
#define NEXTBYTE (*ptr++)
#define IMAGESEP 0x2c
#define INTERLACEMASK 0x40
#define COLORMAPMASK 0x80
WORD iWIDE, iHIGH, eWIDE, eHIGH, expand, numcols, strip, nostrip;
unsigned long cols[256];
char *cmd;

View File

@ -37,8 +37,6 @@
#include "gif.h"
#define GIF2VERSION "1.00"
GIFTOMEM
Gif2Mem(BYTE *MemGif)
{

View File

@ -56,31 +56,6 @@
typedef BYTE byte;
typedef long int count_int;
/* indicies into conv24MB */
#define CONV24_8BIT 0
#define CONV24_24BIT 1
#define CONV24_SEP1 2
#define CONV24_LOCK 3
#define CONV24_SEP2 4
#define CONV24_FAST 5
#define CONV24_SLOW 6
#define CONV24_BEST 7
#define CONV24_MAX 8
/* values 'picType' can take */
#define PIC8 CONV24_8BIT
#define PIC24 CONV24_24BIT
/* MONO returns total intensity of r,g,b components */
#define MONO(rd,gn,bl) (((rd)*11 + (gn)*16 + (bl)*5) >> 5) /*.33R+ .5G+ .17B*/
#ifdef UNUSED
static int Width, Height;
static int curx, cury;
static long CountDown;
static int Interlace;
#endif /* UNUSED */
#ifdef __STDC__
static void compress(int, FILE *, byte *, int);
static void output(int);
@ -95,20 +70,12 @@ static void char_init(), char_out(), flush_char();
#endif /* __STDC__ */
static byte pc2nc[256];
#ifdef UNUSED
static byte r1[256],g1[256],b1[256];
#endif /* UNUSED */
/*************************************************************/
int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
byte *gmap, byte *bmap, byte *pc2ncmap, int numcols,
int colorstyle, int BitsPerPixel)
{
#ifdef UNUSED
int RWidth, RHeight;
int LeftOfs, TopOfs;
int ColorMapSize, Background;
#endif /* UNUSED */
int InitCodeSize;
int i;
byte *pic8 = pic;
@ -121,39 +88,15 @@ int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
numcols=numcols;
colorstyle=colorstyle;
#ifdef UNUSED
Interlace = 0;
Background = 0;
#endif /* UNUSED */
for (i = 0; i < 256; i++) {
pc2nc[i] = pc2ncmap[i];
#ifdef UNUSED
r1[i] = rmap[i];
g1[i] = gmap[i];
b1[i] = bmap[i];
#endif /* UNUSED */
}
#ifdef UNUSED
ColorMapSize = 1 << BitsPerPixel;
RWidth = Width = w;
RHeight = Height = h;
LeftOfs = TopOfs = 0;
CountDown = w * h; /* # of pixels we'll be doing */
#endif /* UNUSED */
if (BitsPerPixel <= 1)
InitCodeSize = 2;
else
InitCodeSize = BitsPerPixel;
#ifdef UNUSED
curx = cury = 0;
#endif /* UNUSED */
if (!fp) {
fprintf(stderr, "WriteGIF: file not open for writing\n" );
return (1);
@ -172,11 +115,7 @@ static unsigned long cur_accum = 0;
static int cur_bits = 0;
#define MAXCODE(n_bits) ( (1 << (n_bits)) - 1)
#ifndef min
#define min(a,b) ((a>b) ? b : a)
#endif /* min */
#define XV_BITS 12 /* BITS was already defined on some systems */
#define MSDOS 1
#define HSIZE 5003 /* 80% occupancy */
typedef unsigned char char_type;
@ -203,10 +142,6 @@ static int hsize = HSIZE; /* for dynamic table sizing */
* used to be 8000 characters).
*/
#define tab_prefixof(i) CodeTabOf(i)
#define tab_suffixof(i) ((char_type *)(htab))[i]
#define de_stack ((char_type *)&tab_suffixof(1<<XV_BITS))
static int free_ent = 0; /* first unused entry */
/*

View File

@ -38,22 +38,14 @@
/* Macro definitions */
/* sizes of various items. these sizes won't change during program execution */
/* The following three must have the same type */
#define ELMT_SIZE (sizeof(unsigned char)) /* we're doing bytes */
#define ELMT_H5_TYPE H5T_NATIVE_UCHAR
#define GOTOERROR(errcode) { ret_code = errcode; goto done; }
#define GOTODONE { goto done; }
#define ERRMSG(mesg) { \
fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
}
#define MSG(mesg) { \
fprintf(stderr, "(%s) at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
}
/* verify: if val is false (0), print mesg. */
#define VRFY(val, mesg) do { \
if (!val) { \
@ -81,10 +73,6 @@ static int clean_file_g = -1; /*whether to cleanup temporary test */
/*files. -1 is not defined; */
/*0 is no cleanup; 1 is do cleanup */
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif /* !MIN */
/* the different types of file descriptors we can expect */
typedef union _file_descr {
int posixfd; /* POSIX file handle*/

View File

@ -32,19 +32,13 @@
#ifdef VMS
# define unlink delete
# define GZ_SUFFIX "-gz"
#endif /* VMS */
#ifdef RISCOS
# define unlink remove
# define GZ_SUFFIX "-gz"
# define fileno(file) file->__file
#endif /* RISCOS */
#ifndef GZ_SUFFIX
# define GZ_SUFFIX ".gz"
#endif /* GZ_SUFFIX */
#define ONE_KB 1024
#define ONE_MB (ONE_KB * ONE_KB)
#define ONE_GB (ONE_MB * ONE_KB)

View File

@ -8039,9 +8039,9 @@ H5T__conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8066,9 +8066,9 @@ H5T__conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8093,9 +8093,9 @@ H5T__conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8120,9 +8120,9 @@ H5T__conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8148,9 +8148,9 @@ H5T__conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@ -8177,9 +8177,9 @@ H5T__conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@ -8205,9 +8205,9 @@ H5T__conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8232,9 +8232,9 @@ H5T__conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8259,9 +8259,9 @@ H5T__conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8286,9 +8286,9 @@ H5T__conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8314,9 +8314,9 @@ H5T__conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_INTEGER*/
@ -8343,9 +8343,9 @@ H5T__conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@ -8371,9 +8371,9 @@ H5T__conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8398,9 +8398,9 @@ H5T__conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8425,9 +8425,9 @@ H5T__conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8452,9 +8452,9 @@ H5T__conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8480,9 +8480,9 @@ H5T__conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@ -8509,9 +8509,9 @@ H5T__conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_UINT */
@ -8537,9 +8537,9 @@ H5T__conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8564,9 +8564,9 @@ H5T__conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8591,9 +8591,9 @@ H5T__conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8618,9 +8618,9 @@ H5T__conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
@ -8646,9 +8646,9 @@ H5T__conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_INTEGER*/
@ -8675,9 +8675,9 @@ H5T__conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@ -8704,9 +8704,9 @@ H5T__conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /* H5T_CONV_INTERNAL_FP_LLONG */
@ -8760,9 +8760,9 @@ H5T__conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_FP_LLONG*/
@ -8816,9 +8816,9 @@ H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX);
GCC_DIAG_ON(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/

View File

@ -2357,25 +2357,6 @@ func_init_failed: \
#define HDcompile_assert(e) do { typedef struct { unsigned int b: (e); } x; } while(0)
*/
/* Macros for enabling/disabling particular GCC warnings */
/* (see the following web-sites for more info:
* http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
* http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas
*/
/* These pragmas are only implemented usefully in gcc 4.6+ */
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
#define GCC_DIAG_STR(s) #s
#define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y)
#define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x)
#define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
#define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x))
#define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop)
#else
#define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x)
#endif
/* Private functions, not part of the publicly documented API */
H5_DLL herr_t H5_init_library(void);
H5_DLL void H5_term_library(void);

View File

@ -72,6 +72,25 @@
extern "C" {
#endif
/* Macros for enabling/disabling particular GCC warnings */
/* (see the following web-sites for more info:
* http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
* http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas
*/
/* These pragmas are only implemented usefully in gcc 4.6+ */
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
#define H5_GCC_DIAG_STR(s) #s
#define H5_GCC_DIAG_JOINSTR(x,y) H5_GCC_DIAG_STR(x ## y)
#define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x)
#define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
#define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR(-W,x))
#define H5_GCC_DIAG_ON(x) H5_GCC_DIAG_PRAGMA(pop)
#else
#define H5_GCC_DIAG_OFF(x)
#define H5_GCC_DIAG_ON(x)
#endif
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
@ -148,8 +167,10 @@ typedef long long ssize_t;
* type.
*/
#if H5_SIZEOF_LONG_LONG >= 8
H5_GCC_DIAG_OFF(long-long)
typedef unsigned long long hsize_t;
typedef signed long long hssize_t;
H5_GCC_DIAG_ON(long-long)
# define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG
# define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG
#else

View File

@ -50,8 +50,10 @@ const char *FILENAME[] = {
#define DATASETNAME15 "Fletcher_float_data_be"
#define DATASETNAME16 "Deflate_float_data_le"
#define DATASETNAME17 "Deflate_float_data_be"
#ifdef H5_HAVE_FILTER_SZIP
#define DATASETNAME18 "Szip_float_data_le"
#define DATASETNAME19 "Szip_float_data_be"
#endif /* H5_HAVE_FILTER_SZIP */
#define DATASETNAME20 "Shuffle_float_data_le"
#define DATASETNAME21 "Shuffle_float_data_be"
#define DATASETNAME22 "Nbit_float_data_le"

View File

@ -46,8 +46,10 @@
#define DATASETNAME15 "Fletcher_float_data_be"
#define DATASETNAME16 "Deflate_float_data_le"
#define DATASETNAME17 "Deflate_float_data_be"
#ifdef H5_HAVE_FILTER_SZIP
#define DATASETNAME18 "Szip_float_data_le"
#define DATASETNAME19 "Szip_float_data_be"
#endif /* H5_HAVE_FILTER_SZIP */
#define DATASETNAME20 "Shuffle_float_data_le"
#define DATASETNAME21 "Shuffle_float_data_be"
#define DATASETNAME22 "Nbit_float_data_le"

View File

@ -31,13 +31,6 @@
#define FILENAME "group_new.h5"
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
int main(void)
{
hid_t fid = -1; /* File ID */

View File

@ -75,7 +75,6 @@ char *paraprefix = NULL; /* for command line option para-prefix */
MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */
#endif
#define FILENAME_BUF_SIZE 1024
#define READ_BUF_SIZE 4096
/*

View File

@ -29,14 +29,12 @@
#define FILEN "testmeta.h5"
#define MEMB_SIZE 100000000
#define CHUNK_SIZE 512
#define NDATAARRAYS 3
/*#define NPOINTS 2048*/
#define NPOINTS 20
#define NEXTARRAYS 10
#define NWATTRS 2
#define NDATAOBJECTS 100000
int main(void)

View File

@ -40,7 +40,6 @@
#define NAMELEN 80
/* 1-D dataset with fixed dimensions */
#define SPACE1_NAME "Space1"
#define SPACE1_RANK 1
#define SPACE1_DIM1 4

View File

@ -26,7 +26,9 @@
#include "hdf5.h"
#define DATAFILE "ttime.h5"
#ifdef NOT_YET
#define DATASETNAME "Dataset"
#endif /* NOT_YET */
/****************************************************************
**

View File

@ -45,7 +45,6 @@
#ifdef H5_HAVE_THREADSAFE
#define FILENAME "ttsafe_dcreate.h5"
#define DATASETNAME_LENGTH 10
#define NUM_THREAD 16
void *tts_dcreate_creator(void *);

View File

@ -29,16 +29,13 @@
#define LONG_BUF_SIZE (2 * MAX_STRING_LENGTH + 4)
#define DSET1_NAME "fl_string_dataset"
#define DSET2_NAME "dataset2"
#define DSET3_NAME "dataset3"
#define DSET4_NAME "dataset4"
#define VL_DSET1_NAME "vl_dset_1"
#define VL_DSET2_NAME "vl_dset_2"
#define GROUP1_NAME "group1"
#define GROUP2_NAME "group2"
#define GROUP3_NAME "group3"
#define GROUP4_NAME "group4"
#define SLINK_NAME "soft_link"
#define RANK 1
#define COMP_INT_VAL 7

View File

@ -32,11 +32,6 @@
#define SPACE1_RANK 1
#define SPACE1_DIM1 4
/* 2-D dataset with fixed dimensions */
#define SPACE2_RANK 2
#define SPACE2_DIM1 10
#define SPACE2_DIM2 10
/* 1-D dataset with fixed dimensions */
#define SPACE3_RANK 1
#define SPACE3_DIM1 128

View File

@ -26,9 +26,6 @@
void parse_command_line (int argc, const char *argv[]);
#define TRUE 1
#define FALSE 0
/* Name of tool */
#define PROGRAMNAME "getub"
char *nbytes = NULL;
@ -79,21 +76,21 @@ usage (const char *prog)
void
parse_command_line (int argc, const char *argv[])
{
int opt = FALSE;
int opt;
/* parse command line options */
while ((opt = get_option (argc, argv, s_opts, l_opts)) != EOF)
{
switch ((char) opt)
{
case 'c':
nbytes = HDstrdup (opt_arg);
break;
case '?':
default:
usage (h5tools_getprogname());
exit (EXIT_FAILURE);
}
{
case 'c':
nbytes = HDstrdup (opt_arg);
break;
case '?':
default:
usage (h5tools_getprogname());
exit (EXIT_FAILURE);
}
}
if (argc <= opt_ind)

View File

@ -28,7 +28,9 @@
#include "hdf5.h"
#include "H5private.h"
/* not used yet
#define UBTXT1 "u0.txt"
*/
#define UBTXT2 "u10.txt"
#define UBTXT3 "u511.txt"
#define UBTXT4 "u512.txt"
@ -69,24 +71,7 @@ char pattern[11] = "abcdefghij";
#define BUF_SIZE 1024
#define LENSTR 50
#define LENSTR2 11
#define SPACE2_RANK 2
#define SPACE2_DIM1 10
#define SPACE2_DIM2 10
#define SPACE1_RANK 1
#define SPACE1_DIM1 4
#define DIM1 20
#define DIM2 10
#define CDIM1 DIM1/2
#define CDIM2 DIM2/2
#define RANK 2
/* Element selection information */
#define POINT1_NPOINTS 10
typedef enum{
RED,
@ -106,22 +91,10 @@ typedef struct s1_t {
/* 1-D array datatype */
#define ARRAY1_RANK 1
#define ARRAY1_DIM1 4
/* 3-D array datatype */
#define ARRAY2_RANK 3
#define ARRAY2_DIM1 3
#define ARRAY2_DIM2 4
#define ARRAY2_DIM3 5
/* 2-D array datatype */
#define ARRAY3_RANK 2
#define ARRAY3_DIM1 6
#define ARRAY3_DIM2 3
/* VL string datatype name */
#define VLSTR_TYPE "vl_string_type"
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t UD_traverse(const char UNUSED * link_name, hid_t UNUSED cur_group,
const void UNUSED * udata, size_t UNUSED udata_size, hid_t UNUSED lapl_id)

View File

@ -24,9 +24,6 @@
#include "h5tools.h"
#include "h5tools_utils.h"
#define TRUE 1
#define FALSE 0
/* Name of tool */
#define PROGRAMNAME "tellub"
@ -85,21 +82,21 @@ usage (const char *prog)
static void
parse_command_line (int argc, const char *argv[])
{
int opt = FALSE;
int opt;
/* parse command line options */
while ((opt = get_option (argc, argv, s_opts, l_opts)) != EOF)
{
switch ((char) opt)
{
case 'h':
usage (h5tools_getprogname());
exit (EXIT_SUCCESS);
case '?':
default:
usage (h5tools_getprogname());
exit (EXIT_FAILURE);
}
{
case 'h':
usage (h5tools_getprogname());
exit (EXIT_SUCCESS);
case '?':
default:
usage (h5tools_getprogname());
exit (EXIT_FAILURE);
}
}
/* check for file name to be processed */

View File

@ -23,7 +23,6 @@
#include "hdf5.h"
#include "H5private.h"
#define KB 1024
#define FAMILY_NUMBER 4
#define FAMILY_SIZE 1024
#define FILENAME "family_file%05d.h5"