summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-05-25 20:57:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-05-25 20:57:18 (GMT)
commitdb2da9f4b4b582d644d4b2e976040fce4dd1d665 (patch)
treeef4f9b58cd68b998b277f167e8e8b23d39e168da /java/src
parent53c5b41ec2068aa45982af071a1e3c707326851f (diff)
downloadhdf5-db2da9f4b4b582d644d4b2e976040fce4dd1d665.zip
hdf5-db2da9f4b4b582d644d4b2e976040fce4dd1d665.tar.gz
hdf5-db2da9f4b4b582d644d4b2e976040fce4dd1d665.tar.bz2
Reduce warnings
Diffstat (limited to 'java/src')
-rw-r--r--java/src/jni/h5Constants.c1
-rw-r--r--java/src/jni/h5lImp.c2
-rw-r--r--java/src/jni/h5pImp.c4
-rw-r--r--java/src/jni/h5plImp.c8
-rw-r--r--java/src/jni/h5sImp.c4
5 files changed, 10 insertions, 9 deletions
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index cd1c2f0..d4511e1 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -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
diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c
index bf2d7b1..ac71845 100644
--- a/java/src/jni/h5lImp.c
+++ b/java/src/jni/h5lImp.c
@@ -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 {
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index df8b3c9..dcfcd82 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -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 */
diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c
index f064634..ffd5b7a 100644
--- a/java/src/jni/h5plImp.c
+++ b/java/src/jni/h5plImp.c
@@ -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);
diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c
index c578ab8..10f69eb 100644
--- a/java/src/jni/h5sImp.c
+++ b/java/src/jni/h5sImp.c
@@ -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);