mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-15 07:40:23 +08:00
Merge pull request #542 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_10 to hdf5_1_10
* commit '9a66e4cd38a63a811949f9753d193ddc9ea9bc63': Reduce warnings
This commit is contained in:
commit
972b82a557
@ -24,6 +24,7 @@ extern "C" {
|
||||
#include <jni.h>
|
||||
#include "hdf5.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
|
@ -457,7 +457,7 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx
|
||||
} /* end if */
|
||||
else {
|
||||
buf_size = infobuf.u.val_size;
|
||||
if(buf_size < 0) {
|
||||
if(buf_size == 0) {
|
||||
h5libraryError(env);
|
||||
} /* end if */
|
||||
else {
|
||||
|
@ -5127,8 +5127,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options
|
||||
else {
|
||||
/* get the length of the filename */
|
||||
H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, NULL, &location_size, &start_on_access);
|
||||
if (location_size < 0) {
|
||||
h5badArgument(env, "H5Pget_mdc_log_options: location_size < 0");
|
||||
if (location_size == 0) {
|
||||
h5badArgument(env, "H5Pget_mdc_log_options: location_size is 0");
|
||||
}/* end if */
|
||||
else if (location_size > 0) {
|
||||
location_size++; /* add extra space for the null terminator */
|
||||
|
@ -68,7 +68,7 @@ JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5PLappend
|
||||
(JNIEnv *env, jclass clss, jobjectArray plugin_path)
|
||||
{
|
||||
char *aName;
|
||||
const char *aName;
|
||||
herr_t retVal = -1;
|
||||
|
||||
PIN_JAVA_STRING(plugin_path, aName);
|
||||
@ -90,7 +90,7 @@ JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5PLprepend
|
||||
(JNIEnv *env, jclass clss, jobjectArray plugin_path)
|
||||
{
|
||||
char *aName;
|
||||
const char *aName;
|
||||
herr_t retVal = -1;
|
||||
|
||||
PIN_JAVA_STRING(plugin_path, aName);
|
||||
@ -113,7 +113,7 @@ JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5PLreplace
|
||||
(JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index)
|
||||
{
|
||||
char *aName;
|
||||
const char *aName;
|
||||
herr_t retVal = -1;
|
||||
|
||||
PIN_JAVA_STRING(plugin_path, aName);
|
||||
@ -136,7 +136,7 @@ JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5PLinsert
|
||||
(JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index)
|
||||
{
|
||||
char *aName;
|
||||
const char *aName;
|
||||
herr_t retVal = -1;
|
||||
|
||||
PIN_JAVA_STRING(plugin_path, aName);
|
||||
|
@ -1206,8 +1206,8 @@ Java_hdf_hdf5lib_H5_H5Sencode
|
||||
if (status < 0) {
|
||||
h5libraryError(env);
|
||||
} /* end else if */
|
||||
else if (buf_size < 0) {
|
||||
h5badArgument(env, "H5Sencode: buf_size < 0");
|
||||
else if (buf_size == 0) {
|
||||
h5badArgument(env, "H5Sencode: buf_size = 0");
|
||||
} /* end if */
|
||||
else {
|
||||
bufPtr = (unsigned char*)HDcalloc((size_t) 1, buf_size);
|
||||
|
Loading…
Reference in New Issue
Block a user