diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/CMakeLists.txt | 4 | ||||
-rw-r--r-- | java/Makefile.am | 10 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/HDF5Constants.java | 9 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java | 5 | ||||
-rw-r--r-- | java/src/jni/CMakeLists.txt | 2 | ||||
-rw-r--r-- | java/src/jni/h5Constants.c | 6 | ||||
-rw-r--r-- | java/src/jni/h5Imp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5dImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5eImp.c | 68 | ||||
-rw-r--r-- | java/src/jni/h5fImp.c | 48 | ||||
-rw-r--r-- | java/src/jni/h5gImp.c | 20 | ||||
-rw-r--r-- | java/src/jni/h5lImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5rImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5sImp.c | 14 | ||||
-rw-r--r-- | java/src/jni/h5tImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5util.c | 6 |
16 files changed, 114 insertions, 88 deletions
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index ffc3b94..528b24f 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -11,8 +11,8 @@ include (${HDF_RESOURCES_DIR}/UseJava.cmake) message (STATUS "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") find_package (JNI) -message ("JNI_LIBRARIES=${JNI_LIBRARIES}") -message ("JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}") +message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") if (WIN32) diff --git a/java/Makefile.am b/java/Makefile.am index ed2414d..51398f2 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -23,13 +23,21 @@ include $(top_srcdir)/config/commence.am +if BUILD_TESTS_CONDITIONAL + TESTSERIAL_DIR =test + TESTEXAMPLES_DIR =examples +else + TESTSERIAL_DIR= + TESTEXAMPLES_DIR= +endif + ## Only recurse into subdirectories if the Java (JNI) interface is enabled. if BUILD_JAVA_CONDITIONAL # Mark this directory as part of the JNI API JAVA_API=yes -SUBDIRS=src test examples +SUBDIRS=src $(TESTSERIAL_DIR) $(TESTEXAMPLES_DIR) # Test with just the native connector, with a single pass-through connector # and with a doubly-stacked pass-through. diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 9294bad..cb5ed22 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -121,6 +121,7 @@ public class HDF5Constants { public static final long H5E_CANTDEC = H5E_CANTDEC(); public static final long H5E_CANTDECODE = H5E_CANTDECODE(); public static final long H5E_CANTDELETE = H5E_CANTDELETE(); + public static final long H5E_CANTDELETEFILE = H5E_CANTDELETEFILE(); public static final long H5E_CANTENCODE = H5E_CANTENCODE(); public static final long H5E_CANTFLUSH = H5E_CANTFLUSH(); public static final long H5E_CANTFREE = H5E_CANTFREE(); @@ -374,6 +375,7 @@ public class HDF5Constants { public static final long H5P_OBJECT_COPY = H5P_OBJECT_COPY(); public static final long H5P_LINK_CREATE = H5P_LINK_CREATE(); public static final long H5P_LINK_ACCESS = H5P_LINK_ACCESS(); + public static final long H5P_VOL_INITIALIZE = H5P_VOL_INITIALIZE(); public static final long H5P_FILE_CREATE_DEFAULT = H5P_FILE_CREATE_DEFAULT(); public static final long H5P_FILE_ACCESS_DEFAULT = H5P_FILE_ACCESS_DEFAULT(); public static final long H5P_DATASET_CREATE_DEFAULT = H5P_DATASET_CREATE_DEFAULT(); @@ -389,6 +391,7 @@ public class HDF5Constants { public static final long H5P_OBJECT_COPY_DEFAULT = H5P_OBJECT_COPY_DEFAULT(); public static final long H5P_LINK_CREATE_DEFAULT = H5P_LINK_CREATE_DEFAULT(); public static final long H5P_LINK_ACCESS_DEFAULT = H5P_LINK_ACCESS_DEFAULT(); + public static final long H5P_VOL_INITIALIZE_DEFAULT = H5P_VOL_INITIALIZE_DEFAULT(); public static final int H5P_CRT_ORDER_TRACKED = H5P_CRT_ORDER_TRACKED(); public static final int H5P_CRT_ORDER_INDEXED = H5P_CRT_ORDER_INDEXED(); public static final long H5P_DEFAULT = H5P_DEFAULT(); @@ -861,6 +864,8 @@ public class HDF5Constants { private static native final long H5E_CANTDELETE(); + private static native final long H5E_CANTDELETEFILE(); + private static native final long H5E_CANTENCODE(); private static native final long H5E_CANTFLUSH(); @@ -1352,6 +1357,8 @@ public class HDF5Constants { private static native final long H5P_LINK_ACCESS(); + private static native final long H5P_VOL_INITIALIZE(); + private static native final long H5P_FILE_CREATE_DEFAULT(); private static native final long H5P_FILE_ACCESS_DEFAULT(); @@ -1382,6 +1389,8 @@ public class HDF5Constants { private static native final long H5P_LINK_ACCESS_DEFAULT(); + private static native final long H5P_VOL_INITIALIZE_DEFAULT(); + private static native final int H5P_CRT_ORDER_TRACKED(); private static native final int H5P_CRT_ORDER_INDEXED(); diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index 3a1361a..54acbdd 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -171,6 +171,9 @@ public class HDF5LibraryException extends HDF5Exception { else if (err_code == HDF5Constants.H5E_MOUNT) { return "file mount error"; } + else if (err_code == HDF5Constants.H5E_CANTDELETEFILE) { + return "Unable to delete file"; + } else if (err_code == HDF5Constants.H5E_SEEKERROR) { return "seek failed"; } @@ -262,7 +265,7 @@ public class HDF5LibraryException extends HDF5Exception { return "unrecognized message"; } else if (err_code == HDF5Constants.H5E_CANTDELETE) { - return " Can't delete message"; + return "Can't delete message"; } else if (err_code == HDF5Constants.H5E_CANTOPENOBJ) { return "Can't open object"; diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 42b4a48..a05921b 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -76,7 +76,7 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) ########### JNI libraries always must be built shared ############### add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS}) -target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} +target_include_directories (${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE "${HDF5_BINARY_DIR};${HDF5_JAVA_JNI_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" ) TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED) diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 74eb436..b9e320f 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -204,6 +204,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDECODE(JNIEnv *env, jclass cls) { return JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETE(JNIEnv *env, jclass cls) { return H5E_CANTDELETE; } JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETEFILE(JNIEnv *env, jclass cls) { return H5E_CANTDELETEFILE; } +JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTENCODE(JNIEnv *env, jclass cls) { return H5E_CANTENCODE; } JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFLUSH(JNIEnv *env, jclass cls) { return H5E_CANTFLUSH; } @@ -731,6 +733,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1CREATE(JNIEnv *env, jclass cls){return JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1ACCESS(JNIEnv *env, jclass cls){return H5P_LINK_ACCESS;} JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5P_1VOL_1INITIALIZE(JNIEnv *env, jclass cls){return H5P_VOL_INITIALIZE;} +JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1CREATE_1DEFAULT(JNIEnv *env, jclass cls){return H5P_FILE_CREATE_DEFAULT;} JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls){return H5P_FILE_ACCESS_DEFAULT;} @@ -760,6 +764,8 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1CREATE_1DEFAULT(JNIEnv *env, jclass cls){return H5P_LINK_CREATE_DEFAULT;} JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls){return H5P_LINK_ACCESS_DEFAULT;} +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5P_1VOL_1INITIALIZE_1DEFAULT(JNIEnv *env, jclass cls){return H5P_VOL_INITIALIZE_DEFAULT;} JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5P_1CRT_1ORDER_1TRACKED(JNIEnv *env, jclass cls){return H5P_CRT_ORDER_TRACKED;} JNIEXPORT jint JNICALL diff --git a/java/src/jni/h5Imp.c b/java/src/jni/h5Imp.c index 99c91fd..f0dd691 100644 --- a/java/src/jni/h5Imp.c +++ b/java/src/jni/h5Imp.c @@ -127,7 +127,7 @@ done: if (libversionArray) UNPIN_INT_ARRAY(ENVONLY, libversion, libversionArray, (status < 0) ? JNI_ABORT : 0); - return (jint)status; + return (jint)status; } /* end Java_hdf_hdf5lib_H5_H5get_1libversion */ /* diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index d46773a..5500847 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1838,7 +1838,7 @@ Java_hdf_hdf5lib_H5_H5Dfill { jboolean isCopy1; jboolean isCopy2; - herr_t status; + herr_t status = FAIL; jbyte *fillP = NULL; jbyte *buffP = NULL; diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 4ab00df..937323e 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -62,11 +62,11 @@ static herr_t H5E_walk_cb(int nindx, const H5E_error2_t *info, void *cb_data); */ JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Eauto_1is_1v2 - (JNIEnv *env, jclass cls, jlong stk_id) + (JNIEnv *env, jclass clss, jlong stk_id) { unsigned int is_stack = 0; - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eauto_is_v2: invalid stack ID"); @@ -85,14 +85,14 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Eregister_1class - (JNIEnv *env, jclass cls, jstring cls_name, jstring lib_name, jstring version) + (JNIEnv *env, jclass clss, jstring cls_name, jstring lib_name, jstring version) { const char* the_cls_name = NULL; const char* the_lib_name = NULL; const char* the_version = NULL; hid_t ret_val = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if (NULL == cls_name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Eregister_class: class name is NULL"); @@ -126,9 +126,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eunregister_1class - (JNIEnv *env, jclass cls, jlong cls_id) + (JNIEnv *env, jclass clss, jlong cls_id) { - UNUSED(cls); + UNUSED(clss); if (cls_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eunregister_class: invalid error class ID"); @@ -147,9 +147,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eclose_1msg - (JNIEnv *env, jclass cls, jlong err_id) + (JNIEnv *env, jclass clss, jlong err_id) { - UNUSED(cls); + UNUSED(clss); if (err_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclose_msg: invalid error message ID"); @@ -168,13 +168,13 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Ecreate_1msg - (JNIEnv *env, jclass cls, jlong err_id, jint msg_type, jstring err_msg) + (JNIEnv *env, jclass clss, jlong err_id, jint msg_type, jstring err_msg) { H5E_type_t error_msg_type = (H5E_type_t)msg_type; const char *the_err_msg = NULL; hid_t ret_val = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if (err_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Ecreate_msg: invalid error class ID"); @@ -200,11 +200,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Ecreate_1stack - (JNIEnv *env, jclass cls) + (JNIEnv *env, jclass clss) { hid_t ret_val = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if ((ret_val = H5Ecreate_stack()) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -220,11 +220,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Eget_1current_1stack - (JNIEnv *env, jclass cls) + (JNIEnv *env, jclass clss) { hid_t ret_val = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if ((ret_val = H5Eget_current_stack()) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -240,9 +240,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eclose_1stack - (JNIEnv *env, jclass cls, jlong stk_id) + (JNIEnv *env, jclass clss, jlong stk_id) { - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclose_stack: invalid error stack ID"); @@ -261,11 +261,11 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eprint2 - (JNIEnv *env, jclass cls, jlong stk_id, jobject stream_obj) + (JNIEnv *env, jclass clss, jlong stk_id, jobject stream_obj) { herr_t ret_val = FAIL; - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eprint2: invalid error stack ID"); @@ -290,13 +290,13 @@ done: */ JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Eget_1class_1name - (JNIEnv *env, jclass cls, jlong cls_id) + (JNIEnv *env, jclass clss, jlong cls_id) { jstring str = NULL; ssize_t buf_size; char *namePtr = NULL; - UNUSED(cls); + UNUSED(clss); if (cls_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_class_name: invalid error class ID"); @@ -332,9 +332,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eset_1current_1stack - (JNIEnv *env, jclass cls, jlong stk_id) + (JNIEnv *env, jclass clss, jlong stk_id) { - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eset_current_stack: invalid error stack ID"); @@ -353,9 +353,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Epop - (JNIEnv *env, jclass cls, jlong stk_id, jlong count) + (JNIEnv *env, jclass clss, jlong stk_id, jlong count) { - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epop: invalid error stack ID"); @@ -374,7 +374,7 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Epush2 - (JNIEnv *env, jclass cls, jlong stk_id, jstring filename, jstring funcname, + (JNIEnv *env, jclass clss, jlong stk_id, jstring filename, jstring funcname, jint linenumber, jlong class_id, jlong major_id, jlong minor_id, jstring err_desc) { const char *fName = NULL; @@ -382,7 +382,7 @@ Java_hdf_hdf5lib_H5_H5Epush2 const char *errMsg = NULL; herr_t ret_val = FAIL; - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epush2: invalid error stack ID"); @@ -423,9 +423,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eclear2 - (JNIEnv *env, jclass cls, jlong stk_id) + (JNIEnv *env, jclass clss, jlong stk_id) { - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclear2: invalid error stack ID"); @@ -444,7 +444,7 @@ done: */ JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Eget_1msg - (JNIEnv *env, jclass cls, jlong msg_id, jintArray error_msg_type_list) + (JNIEnv *env, jclass clss, jlong msg_id, jintArray error_msg_type_list) { H5E_type_t error_msg_type; jstring str = NULL; @@ -452,7 +452,7 @@ Java_hdf_hdf5lib_H5_H5Eget_1msg jint *theArray = NULL; char *namePtr = NULL; - UNUSED(cls); + UNUSED(clss); if (msg_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_msg: invalid error message ID"); @@ -496,11 +496,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Eget_1num - (JNIEnv *env, jclass cls, jlong stk_id) + (JNIEnv *env, jclass clss, jlong stk_id) { ssize_t ret_val = -1; - UNUSED(cls); + UNUSED(clss); if (stk_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_num: invalid error stack ID"); @@ -587,11 +587,11 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Ewalk2 - (JNIEnv *env, jclass cls, jlong stk_id, jlong direction, jobject callback_op, jobject op_data) + (JNIEnv *env, jclass clss, jlong stk_id, jlong direction, jobject callback_op, jobject op_data) { cb_wrapper wrapper = { callback_op, op_data }; - UNUSED(cls); + UNUSED(clss); ENVPTR->GetJavaVM(ENVONLY, &jvm); CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 80567d9..4fd6807 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -118,13 +118,13 @@ done: */ JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Fget_1name - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { jstring str = NULL; ssize_t buf_size; char *namePtr = NULL; - UNUSED(cls); + UNUSED(clss); /* Get the length of the name */ if ((buf_size = H5Fget_name((hid_t)file_id, NULL, 0)) < 0) @@ -378,11 +378,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1freespace - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { hssize_t ret_val = -1; - UNUSED(cls); + UNUSED(clss); if ((ret_val = H5Fget_freespace((hid_t)file_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -418,7 +418,7 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids - (JNIEnv *env, jclass cls, jlong file_id, jint types, jlong maxObjs, + (JNIEnv *env, jclass clss, jlong file_id, jint types, jlong maxObjs, jlongArray obj_id_list) { jboolean isCopy; @@ -428,7 +428,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids jlong *obj_id_listP = NULL; hid_t *id_list = NULL; - UNUSED(cls); + UNUSED(clss); if (NULL == obj_id_list) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_obj_ids: obj_id_list is NULL"); @@ -466,11 +466,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1obj_1count - (JNIEnv *env, jclass cls, jlong file_id, jint types) + (JNIEnv *env, jclass clss, jlong file_id, jint types) { ssize_t ret_val = -1; - UNUSED(cls); + UNUSED(clss); if ((ret_val = H5Fget_obj_count((hid_t)file_id, (unsigned int)types)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -506,11 +506,11 @@ done: */ JNIEXPORT jdouble JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { double rate = 0.0; - UNUSED(cls); + UNUSED(clss); if (H5Fget_mdc_hit_rate((hid_t)file_id, &rate) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -526,7 +526,7 @@ done: */ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size - (JNIEnv *env, jclass cls, jlong file_id, jlongArray metadata_cache) + (JNIEnv *env, jclass clss, jlong file_id, jlongArray metadata_cache) { jboolean isCopy; size_t max_size = 0, min_clean_size = 0, cur_size = 0; @@ -534,7 +534,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size jsize size = 0; int cur_num_entries = -1; - UNUSED(cls); + UNUSED(clss); if (NULL == metadata_cache) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_size: metadata cache array is NULL"); @@ -612,9 +612,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { - UNUSED(cls); + UNUSED(clss); if (H5Freset_mdc_hit_rate_stats((hid_t)file_id) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -630,9 +630,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { - UNUSED(cls); + UNUSED(clss); if (H5Fclear_elink_file_cache((hid_t)file_id) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -648,9 +648,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { - UNUSED(cls); + UNUSED(clss); if (H5Fstart_swmr_write((hid_t)file_id) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -666,9 +666,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { - UNUSED(cls); + UNUSED(clss); if (H5Fstart_mdc_logging((hid_t)file_id) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -684,9 +684,9 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { - UNUSED(cls); + UNUSED(clss); if (H5Fstop_mdc_logging((hid_t)file_id) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -702,7 +702,7 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status - (JNIEnv *env, jclass cls, jlong file_id, jbooleanArray mdc_logging_status) + (JNIEnv *env, jclass clss, jlong file_id, jbooleanArray mdc_logging_status) { jboolean *mdc_logging_status_ptr = NULL; jboolean isCopy; @@ -710,7 +710,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status hbool_t is_currently_logging; jsize size; - UNUSED(cls); + UNUSED(clss); if (NULL == mdc_logging_status) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_logging_status: mdc_logging_status is NULL"); diff --git a/java/src/jni/h5gImp.c b/java/src/jni/h5gImp.c index b579f31..79b1b65 100644 --- a/java/src/jni/h5gImp.c +++ b/java/src/jni/h5gImp.c @@ -148,11 +148,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Gcreate_1anon - (JNIEnv *env, jclass cls, jlong loc_id, jlong gcpl_id, jlong gapl_id) + (JNIEnv *env, jclass clss, jlong loc_id, jlong gcpl_id, jlong gapl_id) { hid_t group_id = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if ((group_id = H5Gcreate_anon((hid_t)loc_id, (hid_t)gcpl_id, (hid_t)gapl_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -198,11 +198,11 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Gget_1create_1plist - (JNIEnv *env, jclass cls, jlong loc_id) + (JNIEnv *env, jclass clss, jlong loc_id) { hid_t plist_id = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if ((plist_id = H5Gget_create_plist((hid_t)loc_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -218,12 +218,12 @@ done: */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Gget_1info - (JNIEnv *env, jclass cls, jlong loc_id) + (JNIEnv *env, jclass clss, jlong loc_id) { H5G_info_t group_info; jobject obj = NULL; - UNUSED(cls); + UNUSED(clss); if (H5Gget_info((hid_t)loc_id, &group_info) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -242,14 +242,14 @@ done: */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1name - (JNIEnv *env, jclass cls, jlong loc_id, jstring name, jlong lapl_id) + (JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong lapl_id) { H5G_info_t group_info; const char *grpName = NULL; jobject obj = NULL; herr_t ret_val = FAIL; - UNUSED(cls); + UNUSED(clss); if (NULL == name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gget_info_by_name: group name is NULL"); @@ -278,7 +278,7 @@ done: */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx - (JNIEnv *env, jclass cls, jlong loc_id, jstring name, jint index_type, + (JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_type, jint order, jlong n, jlong lapl_id) { H5_iter_order_t corder = (H5_iter_order_t)order; @@ -288,7 +288,7 @@ Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx jobject obj = NULL; herr_t ret_val = FAIL; - UNUSED(cls); + UNUSED(clss); if (NULL == name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gget_info_by_idx: group name is NULL"); diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index af6c8ba..7413023 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -628,7 +628,7 @@ H5L_iterate_cb jclass cls; jvalue args[5]; void *op_data = (void *)wrapper->op_data; - jint status; + jint status = -1; if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) { CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE); diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c index 83e2216..1a77fd3 100644 --- a/java/src/jni/h5rImp.c +++ b/java/src/jni/h5rImp.c @@ -211,7 +211,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1obj_1type2 jboolean isCopy, isCopy2; jbyte *refBuf = NULL; jint *ref_objP = NULL; - jint status; + jint status = -1; int retVal = -1; UNUSED(clss); diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index d8110a1..eedd42e 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -66,7 +66,7 @@ Java_hdf_hdf5lib_H5__1H5Screate_1simple hsize_t *lp = NULL; jlong *dimsP = NULL, *maxdimsP = NULL; jlong *jlp = NULL; - jsize drank, mrank; + jsize drank = 0, mrank = 0; int i; hid_t retVal = H5I_INVALID_HID; @@ -1129,14 +1129,14 @@ done: */ JNIEXPORT jbyteArray JNICALL Java_hdf_hdf5lib_H5_H5Sencode - (JNIEnv *env, jclass cls, jlong obj_id) + (JNIEnv *env, jclass clss, jlong obj_id) { unsigned char *bufPtr = NULL; size_t buf_size = 0; herr_t status = FAIL; jbyteArray returnedArray = NULL; - UNUSED(cls); + UNUSED(clss); if (obj_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sencode: invalid object ID"); @@ -1173,13 +1173,13 @@ done: */ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Sdecode - (JNIEnv *env, jclass cls, jbyteArray buf) + (JNIEnv *env, jclass clss, jbyteArray buf) { jboolean isCopy; jbyte *bufP = NULL; hid_t sid = H5I_INVALID_HID; - UNUSED(cls); + UNUSED(clss); if (NULL == buf) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Sdecode: buffer is NULL"); @@ -1203,11 +1203,11 @@ done: */ JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Sis_1regular_1hyperslab - (JNIEnv *env, jclass cls, jlong obj_id) + (JNIEnv *env, jclass clss, jlong obj_id) { htri_t bval = JNI_FALSE; - UNUSED(cls); + UNUSED(clss); if ((bval = H5Sis_regular_hyperslab((hid_t)obj_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c index 313ca8b..460f12e 100644 --- a/java/src/jni/h5tImp.c +++ b/java/src/jni/h5tImp.c @@ -1620,7 +1620,7 @@ done: /* * Class: hdf_hdf5lib_H5 - * Method: H5Tarray_get_dims2 + * Method: H5Tget_array_dims2 * Signature: (J[J)I */ JNIEXPORT jint JNICALL diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 10ca3f2..af83caa 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -3453,7 +3453,7 @@ done: */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1dataset - (JNIEnv *env, jclass cls, jstring file_export_name, jstring file_name, jstring object_path, jint binary_order) + (JNIEnv *env, jclass clss, jstring file_export_name, jstring file_name, jstring object_path, jint binary_order) { const char *file_export = NULL; const char *object_name = NULL; @@ -3462,9 +3462,9 @@ Java_hdf_hdf5lib_H5_H5export_1dataset herr_t ret_val = FAIL; hid_t file_id = H5I_INVALID_HID; hid_t dataset_id = H5I_INVALID_HID; - FILE *stream; + FILE *stream = NULL; - UNUSED(cls); + UNUSED(clss); if (NULL == file_export_name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: file_export_name is NULL"); |