diff options
author | David Young <dyoung@hdfgroup.org> | 2020-01-29 02:35:28 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-01-29 02:35:28 (GMT) |
commit | fa1b2f6ef35c459c9f74ead885c119ae7f61c056 (patch) | |
tree | a71219e0f97dfd57e2c1a8a2e89b65476631ba0b /java/src/jni/h5plImp.c | |
parent | 71c050f837149a0c11e0936e661047c091deaa2f (diff) | |
download | hdf5-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/h5plImp.c')
-rw-r--r-- | java/src/jni/h5plImp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index b43b532..ce42842 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -129,7 +129,7 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLreplace - (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) + (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint idx) { const char *newPath = NULL; herr_t retVal = FAIL; @@ -139,12 +139,12 @@ Java_hdf_hdf5lib_H5_H5PLreplace if (NULL == plugin_path) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5PLreplace: new path is NULL"); - if (index < 0) + if (idx < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLreplace: index < 0"); PIN_JAVA_STRING(ENVONLY, plugin_path, newPath, NULL, "H5PLreplace: new path not pinned"); - if ((retVal = H5PLreplace(newPath, (unsigned) index)) < 0) + if ((retVal = H5PLreplace(newPath, (unsigned) idx)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -159,7 +159,7 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLinsert - (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) + (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint idx) { const char *newPath = NULL; herr_t retVal = FAIL; @@ -169,12 +169,12 @@ Java_hdf_hdf5lib_H5_H5PLinsert if (NULL == plugin_path) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5PLinsert: new path is NULL"); - if (index < 0) + if (idx < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLinsert: index < 0"); PIN_JAVA_STRING(ENVONLY, plugin_path, newPath, NULL, "H5PLinsert: new path not pinned"); - if ((retVal = H5PLinsert(newPath, (unsigned) index)) < 0) + if ((retVal = H5PLinsert(newPath, (unsigned) idx)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -189,14 +189,14 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLremove - (JNIEnv *env, jclass clss, jint index) + (JNIEnv *env, jclass clss, jint idx) { UNUSED(clss); - if (index < 0) + if (idx < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLremove: index < 0"); - if (H5PLremove((unsigned) index) < 0) + if (H5PLremove((unsigned) idx) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -210,7 +210,7 @@ done: */ JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5PLget - (JNIEnv *env, jclass clss, jint index) + (JNIEnv *env, jclass clss, jint idx) { jstring str = NULL; ssize_t buf_size; @@ -218,17 +218,17 @@ Java_hdf_hdf5lib_H5_H5PLget UNUSED(clss); - if (index < 0) + if (idx < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLget: index < 0"); /* Get the length of the name */ - if ((buf_size = H5PLget((unsigned) index, NULL, 0)) < 0) + if ((buf_size = H5PLget((unsigned) idx, NULL, 0)) < 0) H5_LIBRARY_ERROR(ENVONLY); if (NULL == (aName = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5PLget: failed to allocate plugin name buffer"); - if ((H5PLget((unsigned) index, aName, (size_t)buf_size + 1)) < 0) + if ((H5PLget((unsigned) idx, aName, (size_t)buf_size + 1)) < 0) H5_LIBRARY_ERROR(ENVONLY); aName[buf_size] = '\0'; |