summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-03-16 03:13:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-03-16 03:13:52 (GMT)
commit288c7760a4a55d56df7a9019a8522625e305b9b7 (patch)
tree45f89de4d98a01416f27ada601a6d7fff6e49a82 /src
parentf5689224b5faaf01c02a1a4ae2a0a71b9f46e1d0 (diff)
downloadhdf5-288c7760a4a55d56df7a9019a8522625e305b9b7.zip
hdf5-288c7760a4a55d56df7a9019a8522625e305b9b7.tar.gz
hdf5-288c7760a4a55d56df7a9019a8522625e305b9b7.tar.bz2
[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)
Diffstat (limited to 'src')
-rw-r--r--src/H5Tconv.c108
-rw-r--r--src/H5private.h19
-rw-r--r--src/H5public.h21
3 files changed, 75 insertions, 73 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index bf686b8..58b0b46 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -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*/
diff --git a/src/H5private.h b/src/H5private.h
index 26ccf57..d1dcd84 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -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);
diff --git a/src/H5public.h b/src/H5public.h
index 544f7be..35207df 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -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