summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5Constants.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-01-29 02:35:28 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-01-29 02:35:28 (GMT)
commitfa1b2f6ef35c459c9f74ead885c119ae7f61c056 (patch)
treea71219e0f97dfd57e2c1a8a2e89b65476631ba0b /java/src/jni/h5Constants.c
parent71c050f837149a0c11e0936e661047c091deaa2f (diff)
downloadhdf5-fa1b2f6ef35c459c9f74ead885c119ae7f61c056.zip
hdf5-fa1b2f6ef35c459c9f74ead885c119ae7f61c056.tar.gz
hdf5-fa1b2f6ef35c459c9f74ead885c119ae7f61c056.tar.bz2
Reduce differences between my -Werror branch and `develop`:
Rename index -> idx, fileno -> fnumber, fileno -> fno to avoid GCC shadowed declaration warnings about index(3). Convert #pragma GCC diagnostic push/pop/ignored to the HDF5 library's H5_GCC_DIAG_OFF()/H5_GCC_DIAG_ON() macros.
Diffstat (limited to 'java/src/jni/h5Constants.c')
-rw-r--r--java/src/jni/h5Constants.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index 77a5d18..8fdca35 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -26,9 +26,8 @@ extern "C" {
#include <stdlib.h>
#include "h5jni.h"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
+H5_GCC_DIAG_OFF(missing-prototypes)
+H5_GCC_DIAG_OFF(unused-parameter)
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls) { return (hsize_t)HADDR_MAX/4; }
@@ -366,8 +365,7 @@ JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1CANCELED(JNIEnv *env, jclass cls) { return H5ES_STATUS_CANCELED; }
/* Java does not have unsigned native types */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+H5_GCC_DIAG_OFF(sign-conversion)
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1CREAT(JNIEnv *env, jclass cls) { return H5F_ACC_CREAT; }
JNIEXPORT jint JNICALL
@@ -384,7 +382,7 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1READ(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_READ; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1WRITE(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_WRITE; }
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(sign-conversion)
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1DEFAULT(JNIEnv *env, jclass cls) { return H5F_CLOSE_DEFAULT; }
@@ -1412,7 +1410,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5Z_1SCALEOFFSET_1USER_1NPARMS(JNIEnv *env, jclas
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ALL(JNIEnv *env, jclass cls) { return H5Z_FILTER_ALL; }
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(missing-prototypes)
+H5_GCC_DIAG_ON(unused-parameter)
#ifdef __cplusplus
} /* end extern "C" */