summaryrefslogtreecommitdiffstats
path: root/java/src/jni
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-29 04:59:25 (GMT)
committerGitHub <noreply@github.com>2021-06-29 04:59:25 (GMT)
commit4ff544f9977da3bd54eac03cc124961eea7c4daf (patch)
treed23a3d50fbeb2c1eca882db4d48726173f25097c /java/src/jni
parent734d317da9c759799c92ff47e05e3be7e3e969a9 (diff)
downloadhdf5-4ff544f9977da3bd54eac03cc124961eea7c4daf.zip
hdf5-4ff544f9977da3bd54eac03cc124961eea7c4daf.tar.gz
hdf5-4ff544f9977da3bd54eac03cc124961eea7c4daf.tar.bz2
Cleans up POSIX/C bits in H5private.h (#804)
* Cleans up POSIX/C bits in H5private.h * Assume difftime exists (C89) * Reorg AC_CHECK_HEADERS so headers are in alphabetical order * Split off networking-related AC_CHECK_HEADERS * Remove unused UNAME_CYGWIN from configure.ac * Remove checks for unused sys/timeb.h * Tidying pass over H5private.h HD prefix macros * Tidy H5win32defs.h * Add HD prefix to various scanf calls * Committing clang-format changes * Fixes to the alarm(2) code used in the tests to make Windows happy Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'java/src/jni')
-rw-r--r--java/src/jni/h5util.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 6281481..8021438 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -225,7 +225,7 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
case sizeof(float): {
float tmp_float = 0.0f;
- sscanf(token, "%f", &tmp_float);
+ HDsscanf(token, "%f", &tmp_float);
HDmemcpy(cptr, &tmp_float, sizeof(float));
break;
}
@@ -233,7 +233,7 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
case sizeof(double): {
double tmp_double = 0.0;
- sscanf(token, "%lf", &tmp_double);
+ HDsscanf(token, "%lf", &tmp_double);
HDmemcpy(cptr, &tmp_double, sizeof(double));
break;
}
@@ -241,7 +241,7 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
case sizeof(long double): {
long double tmp_ldouble = 0.0;
- sscanf(token, "%Lg", &tmp_ldouble);
+ HDsscanf(token, "%Lg", &tmp_ldouble);
HDmemcpy(cptr, &tmp_ldouble, sizeof(long double));
break;
}
@@ -289,11 +289,11 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
signed char tmp_char = 0;
if (H5T_SGN_NONE == nsign) {
- sscanf(token, "%hhu", &tmp_uchar);
+ HDsscanf(token, "%hhu", &tmp_uchar);
HDmemcpy(cptr, &tmp_uchar, sizeof(unsigned char));
}
else {
- sscanf(token, "%hhd", &tmp_char);
+ HDsscanf(token, "%hhd", &tmp_char);
HDmemcpy(cptr, &tmp_char, sizeof(char));
}
@@ -305,11 +305,11 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
short tmp_short = 0;
if (H5T_SGN_NONE == nsign) {
- sscanf(token, "%hu", &tmp_ushort);
+ HDsscanf(token, "%hu", &tmp_ushort);
HDmemcpy(&tmp_ushort, cptr, sizeof(unsigned short));
}
else {
- sscanf(token, "%hd", &tmp_short);
+ HDsscanf(token, "%hd", &tmp_short);
HDmemcpy(&tmp_short, cptr, sizeof(short));
}
@@ -321,11 +321,11 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
int tmp_int = 0;
if (H5T_SGN_NONE == nsign) {
- sscanf(token, "%u", &tmp_uint);
+ HDsscanf(token, "%u", &tmp_uint);
HDmemcpy(cptr, &tmp_uint, sizeof(unsigned int));
}
else {
- sscanf(token, "%d", &tmp_int);
+ HDsscanf(token, "%d", &tmp_int);
HDmemcpy(cptr, &tmp_int, sizeof(int));
}
@@ -338,11 +338,11 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
long tmp_long = 0;
if (H5T_SGN_NONE == nsign) {
- sscanf(token, "%lu", &tmp_ulong);
+ HDsscanf(token, "%lu", &tmp_ulong);
HDmemcpy(cptr, &tmp_ulong, sizeof(unsigned long));
}
else {
- sscanf(token, "%ld", &tmp_long);
+ HDsscanf(token, "%ld", &tmp_long);
HDmemcpy(cptr, &tmp_long, sizeof(long));
}
@@ -355,11 +355,11 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
long long tmp_llong = 0;
if (H5T_SGN_NONE == nsign) {
- sscanf(token, fmt_ullong, &tmp_ullong);
+ HDsscanf(token, fmt_ullong, &tmp_ullong);
HDmemcpy(cptr, &tmp_ullong, sizeof(unsigned long long));
}
else {
- sscanf(token, fmt_llong, &tmp_llong);
+ HDsscanf(token, fmt_llong, &tmp_llong);
HDmemcpy(cptr, &tmp_llong, sizeof(long long));
}