mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
Merge pull request #2318 in HDFFV/hdf5 from ~DYOUNG/werror:reduce-werror-diffs-1 to develop
* commit 'fa1b2f6ef35c459c9f74ead885c119ae7f61c056': Reduce differences between my -Werror branch and `develop`:
This commit is contained in:
commit
43d41633a1
@ -26,9 +26,8 @@ extern "C" {
|
||||
#include <stdlib.h>
|
||||
#include "h5jni.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
H5_GCC_DIAG_OFF(missing-prototypes)
|
||||
H5_GCC_DIAG_OFF(unused-parameter)
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls) { return (hsize_t)HADDR_MAX/4; }
|
||||
@ -366,8 +365,7 @@ JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1CANCELED(JNIEnv *env, jclass cls) { return H5ES_STATUS_CANCELED; }
|
||||
|
||||
/* Java does not have unsigned native types */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
H5_GCC_DIAG_OFF(sign-conversion)
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1CREAT(JNIEnv *env, jclass cls) { return H5F_ACC_CREAT; }
|
||||
JNIEXPORT jint JNICALL
|
||||
@ -384,7 +382,7 @@ JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1READ(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_READ; }
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1WRITE(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_WRITE; }
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(sign-conversion)
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1DEFAULT(JNIEnv *env, jclass cls) { return H5F_CLOSE_DEFAULT; }
|
||||
@ -1412,7 +1410,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5Z_1SCALEOFFSET_1USER_1NPARMS(JNIEnv *env, jclas
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ALL(JNIEnv *env, jclass cls) { return H5Z_FILTER_ALL; }
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(missing-prototypes)
|
||||
H5_GCC_DIAG_ON(unused-parameter)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end extern "C" */
|
||||
|
@ -1237,7 +1237,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1dsetname
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
|
||||
{
|
||||
ssize_t buf_size;
|
||||
char *dname = NULL;
|
||||
@ -1246,13 +1246,13 @@ Java_hdf_hdf5lib_H5_H5Pget_1virtual_1dsetname
|
||||
UNUSED(clss);
|
||||
|
||||
/* get the length of the filename */
|
||||
if ((buf_size = H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t)index, NULL, 0)) < 0)
|
||||
if ((buf_size = H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t) idx, NULL, 0)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
|
||||
if (NULL == (dname = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
|
||||
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_virtual_dsetname: memory allocation failed");
|
||||
|
||||
if (H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t)index, dname, (size_t)buf_size + 1) < 0)
|
||||
if (H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t) idx, dname, (size_t)buf_size + 1) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
dname[buf_size] = '\0';
|
||||
|
||||
@ -1275,7 +1275,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1filename
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
|
||||
{
|
||||
ssize_t buf_size;
|
||||
char *fname = NULL;
|
||||
@ -1284,13 +1284,13 @@ Java_hdf_hdf5lib_H5_H5Pget_1virtual_1filename
|
||||
UNUSED(clss);
|
||||
|
||||
/* get the length of the filename */
|
||||
if ((buf_size = H5Pget_virtual_filename((hid_t)dcpl_id, (size_t)index, NULL, 0)) < 0)
|
||||
if ((buf_size = H5Pget_virtual_filename((hid_t)dcpl_id, (size_t) idx, NULL, 0)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
|
||||
if (NULL == (fname = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
|
||||
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_virtual_filename: memory allocation failed");
|
||||
|
||||
if (H5Pget_virtual_filename((hid_t)dcpl_id, (size_t)index, fname, (size_t)buf_size + 1) < 0)
|
||||
if (H5Pget_virtual_filename((hid_t)dcpl_id, (size_t) idx, fname, (size_t)buf_size + 1) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
fname[buf_size] = '\0';
|
||||
|
||||
@ -1313,13 +1313,13 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1srcspace
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
|
||||
{
|
||||
hid_t space_id = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(clss);
|
||||
|
||||
if ((space_id = H5Pget_virtual_srcspace((hid_t)dcpl_id, (size_t)index)) < 0)
|
||||
if ((space_id = H5Pget_virtual_srcspace((hid_t)dcpl_id, (size_t) idx)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
|
||||
done:
|
||||
@ -1333,13 +1333,13 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1vspace
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
|
||||
(JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
|
||||
{
|
||||
hid_t space_id = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(clss);
|
||||
|
||||
if ((space_id = H5Pget_virtual_vspace((hid_t)dcpl_id, (size_t)index)) < 0)
|
||||
if ((space_id = H5Pget_virtual_vspace((hid_t)dcpl_id, (size_t) idx)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
|
||||
done:
|
||||
|
@ -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';
|
||||
|
||||
|
@ -133,11 +133,10 @@ H5FL_EXTERN(H5D_chunk_info_t);
|
||||
H5FL_BLK_EXTERN(type_conv);
|
||||
|
||||
/* Disable warning for intentional identical branches here -QAK */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlarger-than="
|
||||
H5_GCC_DIAG_OFF(larger-than=)
|
||||
/* Define a static "default" dataset structure to use to initialize new datasets */
|
||||
static H5D_shared_t H5D_def_dset;
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(larger-than=)
|
||||
|
||||
/* Dataset ID class */
|
||||
static const H5I_class_t H5I_DATASET_CLS[1] = {{
|
||||
|
15
src/H5Dio.c
15
src/H5Dio.c
@ -1131,7 +1131,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
|
||||
uint32_t global_no_collective_cause;
|
||||
hbool_t local_error_message_previously_written = FALSE;
|
||||
hbool_t global_error_message_previously_written = FALSE;
|
||||
size_t index;
|
||||
size_t idx;
|
||||
size_t cause_strings_len;
|
||||
char local_no_collective_cause_string[512] = "";
|
||||
char global_no_collective_cause_string[512] = "";
|
||||
@ -1153,8 +1153,11 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
|
||||
|
||||
/* Append each of the "reason for breaking collective I/O" error messages to the
|
||||
* local and global no collective cause strings */
|
||||
for (cause = 1, index = 0; (cause < H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE) && (index < cause_strings_len); cause <<= 1, index++) {
|
||||
size_t cause_strlen = HDstrlen(cause_strings[index]);
|
||||
for (cause = 1, idx = 0;
|
||||
(cause < H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE) &&
|
||||
(idx < cause_strings_len);
|
||||
cause <<= 1, idx++) {
|
||||
size_t cause_strlen = HDstrlen(cause_strings[idx]);
|
||||
|
||||
if (cause & local_no_collective_cause) {
|
||||
/* Check if there were any previous error messages included. If so, prepend a semicolon
|
||||
@ -1163,7 +1166,8 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
|
||||
if(local_error_message_previously_written)
|
||||
HDstrncat(local_no_collective_cause_string, "; ", 2);
|
||||
|
||||
HDstrncat(local_no_collective_cause_string, cause_strings[index], cause_strlen);
|
||||
HDstrncat(local_no_collective_cause_string,
|
||||
cause_strings[idx], cause_strlen);
|
||||
|
||||
local_error_message_previously_written = TRUE;
|
||||
} /* end if */
|
||||
@ -1175,7 +1179,8 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
|
||||
if(global_error_message_previously_written)
|
||||
HDstrncat(global_no_collective_cause_string, "; ", 2);
|
||||
|
||||
HDstrncat(global_no_collective_cause_string, cause_strings[index], cause_strlen);
|
||||
HDstrncat(global_no_collective_cause_string,
|
||||
cause_strings[idx], cause_strlen);
|
||||
|
||||
global_error_message_previously_written = TRUE;
|
||||
} /* end if */
|
||||
|
10
src/H5F.c
10
src/H5F.c
@ -1052,15 +1052,15 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5Fget_fileno(hid_t file_id, unsigned long *fileno)
|
||||
H5Fget_fileno(hid_t file_id, unsigned long *fnumber)
|
||||
{
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("e", "i*Ul", file_id, fileno);
|
||||
H5TRACE2("e", "i*Ul", file_id, fnumber);
|
||||
|
||||
/* If no fileno pointer was passed in, exit quietly */
|
||||
if(fileno) {
|
||||
/* If no fnumber pointer was passed in, exit quietly */
|
||||
if(fnumber) {
|
||||
H5VL_object_t *vol_obj; /* File info */
|
||||
|
||||
/* Get the internal file structure */
|
||||
@ -1068,7 +1068,7 @@ H5Fget_fileno(hid_t file_id, unsigned long *fileno)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
/* Get the flags */
|
||||
if((ret_value = H5VL_file_get(vol_obj, H5VL_FILE_GET_FILENO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fileno)) < 0)
|
||||
if((ret_value = H5VL_file_get(vol_obj, H5VL_FILE_GET_FILENO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fnumber)) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's 'file number'")
|
||||
} /* end if */
|
||||
|
||||
|
@ -619,8 +619,7 @@ done:
|
||||
* memb_name & temp in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static H5FD_t *
|
||||
H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
|
||||
haddr_t maxaddr)
|
||||
@ -771,7 +770,7 @@ done:
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5FD_family_open() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -957,8 +956,7 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
|
||||
* memb_name in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static herr_t
|
||||
H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
|
||||
{
|
||||
@ -1025,7 +1023,7 @@ done:
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -1961,8 +1961,7 @@ compute_next(H5FD_multi_t *file)
|
||||
* tmp in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static int
|
||||
open_members(H5FD_multi_t *file)
|
||||
{
|
||||
@ -1996,7 +1995,7 @@ open_members(H5FD_multi_t *file)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
#ifdef _H5private_H
|
||||
|
32
src/H5PL.c
32
src/H5PL.c
@ -210,13 +210,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5PLreplace(const char *search_path, unsigned int index)
|
||||
H5PLreplace(const char *search_path, unsigned int idx)
|
||||
{
|
||||
unsigned num_paths; /* Current number of stored paths */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("e", "*sIu", search_path, index);
|
||||
H5TRACE2("e", "*sIu", search_path, idx);
|
||||
|
||||
/* Check args */
|
||||
if (NULL == search_path)
|
||||
@ -228,11 +228,11 @@ H5PLreplace(const char *search_path, unsigned int index)
|
||||
num_paths = H5PL__get_num_paths();
|
||||
if (0 == num_paths)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
|
||||
else if (index >= num_paths)
|
||||
else if (idx >= num_paths)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
|
||||
|
||||
/* Insert the search path into the path table */
|
||||
if (H5PL__replace_path(search_path, index) < 0)
|
||||
if (H5PL__replace_path(search_path, idx) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path")
|
||||
|
||||
done:
|
||||
@ -252,13 +252,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5PLinsert(const char *search_path, unsigned int index)
|
||||
H5PLinsert(const char *search_path, unsigned int idx)
|
||||
{
|
||||
unsigned num_paths; /* Current number of stored paths */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("e", "*sIu", search_path, index);
|
||||
H5TRACE2("e", "*sIu", search_path, idx);
|
||||
|
||||
/* Check args */
|
||||
if (NULL == search_path)
|
||||
@ -268,11 +268,11 @@ H5PLinsert(const char *search_path, unsigned int index)
|
||||
|
||||
/* Check index */
|
||||
num_paths = H5PL__get_num_paths();
|
||||
if ((0 != num_paths) && (index >= num_paths))
|
||||
if ((0 != num_paths) && (idx >= num_paths))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
|
||||
|
||||
/* Insert the search path into the path table */
|
||||
if (H5PL__insert_path(search_path, index) < 0)
|
||||
if (H5PL__insert_path(search_path, idx) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path")
|
||||
|
||||
done:
|
||||
@ -294,23 +294,23 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5PLremove(unsigned int index)
|
||||
H5PLremove(unsigned int idx)
|
||||
{
|
||||
unsigned num_paths; /* Current number of stored paths */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE1("e", "Iu", index);
|
||||
H5TRACE1("e", "Iu", idx);
|
||||
|
||||
/* Check index */
|
||||
num_paths = H5PL__get_num_paths();
|
||||
if (0 == num_paths)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
|
||||
else if (index >= num_paths)
|
||||
else if (idx >= num_paths)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
|
||||
|
||||
/* Delete the search path from the path table */
|
||||
if (H5PL__remove_path(index) < 0)
|
||||
if (H5PL__remove_path(idx) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "unable to remove search path")
|
||||
|
||||
done:
|
||||
@ -343,7 +343,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
ssize_t
|
||||
H5PLget(unsigned int index, char *path_buf, size_t buf_size)
|
||||
H5PLget(unsigned int idx, char *path_buf, size_t buf_size)
|
||||
{
|
||||
unsigned num_paths; /* Current number of stored paths */
|
||||
const char *path = NULL; /* path from table */
|
||||
@ -351,13 +351,13 @@ H5PLget(unsigned int index, char *path_buf, size_t buf_size)
|
||||
ssize_t ret_value = 0; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE3("Zs", "Iu*sz", index, path_buf, buf_size);
|
||||
H5TRACE3("Zs", "Iu*sz", idx, path_buf, buf_size);
|
||||
|
||||
/* Check index */
|
||||
num_paths = H5PL__get_num_paths();
|
||||
if (0 == num_paths)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
|
||||
else if (index >= num_paths)
|
||||
else if (idx >= num_paths)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
|
||||
|
||||
/* Check if the search table is empty */
|
||||
@ -365,7 +365,7 @@ H5PLget(unsigned int index, char *path_buf, size_t buf_size)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, (-1), "plugin search path table is empty")
|
||||
|
||||
/* Get the path at the specified index and its length */
|
||||
if (NULL == (path = H5PL__get_path(index)))
|
||||
if (NULL == (path = H5PL__get_path(idx)))
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, (-1), "no path stored at that index")
|
||||
path_len = HDstrlen(path);
|
||||
|
||||
|
@ -304,8 +304,7 @@ done:
|
||||
* get_plugin_info function pointer, but early (4.4.7, at least) gcc
|
||||
* only allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
H5_GCC_DIAG_OFF(pedantic)
|
||||
herr_t
|
||||
H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key,
|
||||
hbool_t *success, const void **plugin_info)
|
||||
@ -417,7 +416,7 @@ done:
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5PL__open() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(pedantic)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -62,9 +62,9 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
static herr_t H5PL__insert_at(const char *path, unsigned int index);
|
||||
static herr_t H5PL__make_space_at(unsigned int index);
|
||||
static herr_t H5PL__replace_at(const char *path, unsigned int index);
|
||||
static herr_t H5PL__insert_at(const char *path, unsigned int idx);
|
||||
static herr_t H5PL__make_space_at(unsigned int idx);
|
||||
static herr_t H5PL__replace_at(const char *path, unsigned int idx);
|
||||
static herr_t H5PL__expand_path_table(void);
|
||||
static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info);
|
||||
|
||||
@ -105,7 +105,7 @@ static unsigned H5PL_path_capacity_g = H5PL_INITIAL_PATH_CAPACITY;
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5PL__insert_at(const char *path, unsigned int index)
|
||||
H5PL__insert_at(const char *path, unsigned int idx)
|
||||
{
|
||||
char *path_copy = NULL; /* copy of path string (for storing) */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
@ -132,12 +132,12 @@ H5PL__insert_at(const char *path, unsigned int index)
|
||||
#endif /* H5_HAVE_WIN32_API */
|
||||
|
||||
/* If the table entry is in use, make some space */
|
||||
if (H5PL_paths_g[index])
|
||||
if (H5PL__make_space_at(index) < 0)
|
||||
if (H5PL_paths_g[idx])
|
||||
if (H5PL__make_space_at(idx) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "unable to make space in the table for the new entry")
|
||||
|
||||
/* Insert the copy of the search path into the table at the specified index */
|
||||
H5PL_paths_g[index] = path_copy;
|
||||
H5PL_paths_g[idx] = path_copy;
|
||||
H5PL_num_paths_g++;
|
||||
|
||||
done:
|
||||
@ -156,7 +156,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5PL__make_space_at(unsigned int index)
|
||||
H5PL__make_space_at(unsigned int idx)
|
||||
{
|
||||
unsigned u; /* iterator */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
@ -164,13 +164,13 @@ H5PL__make_space_at(unsigned int index)
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Check args - Just assert on package functions */
|
||||
HDassert(index < H5PL_path_capacity_g);
|
||||
HDassert(idx < H5PL_path_capacity_g);
|
||||
|
||||
/* Copy the paths back to make a space */
|
||||
for (u = H5PL_num_paths_g; u > index; u--)
|
||||
for (u = H5PL_num_paths_g; u > idx; u--)
|
||||
H5PL_paths_g[u] = H5PL_paths_g[u-1];
|
||||
|
||||
H5PL_paths_g[index] = NULL;
|
||||
H5PL_paths_g[idx] = NULL;
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5PL__make_space_at() */
|
||||
@ -188,7 +188,7 @@ H5PL__make_space_at(unsigned int index)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5PL__replace_at(const char *path, unsigned int index)
|
||||
H5PL__replace_at(const char *path, unsigned int idx)
|
||||
{
|
||||
char *path_copy = NULL; /* copy of path string (for storing) */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
@ -200,8 +200,8 @@ H5PL__replace_at(const char *path, unsigned int index)
|
||||
HDassert(HDstrlen(path));
|
||||
|
||||
/* Check that the table entry is in use */
|
||||
if (!H5PL_paths_g[index])
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", index)
|
||||
if (!H5PL_paths_g[idx])
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", idx)
|
||||
|
||||
/* Copy the path for storage so the caller can dispose of theirs */
|
||||
if (NULL == (path_copy = H5MM_strdup(path)))
|
||||
@ -214,10 +214,10 @@ H5PL__replace_at(const char *path, unsigned int index)
|
||||
#endif /* H5_HAVE_WIN32_API */
|
||||
|
||||
/* Free the existing path entry */
|
||||
H5PL_paths_g[index] = (char *)H5MM_xfree(H5PL_paths_g[index]);
|
||||
H5PL_paths_g[idx] = (char *)H5MM_xfree(H5PL_paths_g[idx]);
|
||||
|
||||
/* Copy the search path into the table at the specified index */
|
||||
H5PL_paths_g[index] = path_copy;
|
||||
H5PL_paths_g[idx] = path_copy;
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
@ -448,7 +448,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5PL__replace_path(const char *path, unsigned int index)
|
||||
H5PL__replace_path(const char *path, unsigned int idx)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
@ -457,10 +457,10 @@ H5PL__replace_path(const char *path, unsigned int index)
|
||||
/* Check args - Just assert on package functions */
|
||||
HDassert(path);
|
||||
HDassert(HDstrlen(path));
|
||||
HDassert(index < H5PL_path_capacity_g);
|
||||
HDassert(idx < H5PL_path_capacity_g);
|
||||
|
||||
/* Insert the path at the requested index */
|
||||
if (H5PL__replace_at(path, index) < 0)
|
||||
if (H5PL__replace_at(path, idx) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path")
|
||||
|
||||
done:
|
||||
@ -479,7 +479,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5PL__insert_path(const char *path, unsigned int index)
|
||||
H5PL__insert_path(const char *path, unsigned int idx)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
@ -488,10 +488,10 @@ H5PL__insert_path(const char *path, unsigned int index)
|
||||
/* Check args - Just assert on package functions */
|
||||
HDassert(path);
|
||||
HDassert(HDstrlen(path));
|
||||
HDassert(index < H5PL_path_capacity_g);
|
||||
HDassert(idx < H5PL_path_capacity_g);
|
||||
|
||||
/* Insert the path at the requested index */
|
||||
if (H5PL__insert_at(path, index) < 0)
|
||||
if (H5PL__insert_at(path, idx) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path")
|
||||
|
||||
done:
|
||||
@ -510,7 +510,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5PL__remove_path(unsigned int index)
|
||||
H5PL__remove_path(unsigned int idx)
|
||||
{
|
||||
unsigned u; /* iterator */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
@ -518,18 +518,18 @@ H5PL__remove_path(unsigned int index)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args - Just assert on package functions */
|
||||
HDassert(index < H5PL_path_capacity_g);
|
||||
HDassert(idx < H5PL_path_capacity_g);
|
||||
|
||||
/* Check if the path at that index is set */
|
||||
if (!H5PL_paths_g[index])
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", index)
|
||||
if (!H5PL_paths_g[idx])
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", idx)
|
||||
|
||||
/* Delete the path */
|
||||
H5PL_num_paths_g--;
|
||||
H5PL_paths_g[index] = (char *)H5MM_xfree(H5PL_paths_g[index]);
|
||||
H5PL_paths_g[idx] = (char *)H5MM_xfree(H5PL_paths_g[idx]);
|
||||
|
||||
/* Shift the paths down to close the gap */
|
||||
for (u = index; u < H5PL_num_paths_g; u++)
|
||||
for (u = idx; u < H5PL_num_paths_g; u++)
|
||||
H5PL_paths_g[u] = H5PL_paths_g[u+1];
|
||||
|
||||
/* Set the (former) last path to NULL */
|
||||
@ -551,17 +551,17 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
const char *
|
||||
H5PL__get_path(unsigned int index)
|
||||
H5PL__get_path(unsigned int idx)
|
||||
{
|
||||
char *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Get the path at the requested index */
|
||||
if (index >= H5PL_num_paths_g)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", index)
|
||||
if (idx >= H5PL_num_paths_g)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", idx)
|
||||
|
||||
return H5PL_paths_g[index];
|
||||
return H5PL_paths_g[idx];
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5PL__replace_path() */
|
||||
|
@ -253,8 +253,7 @@ done:
|
||||
/* See the other use of H5PL_GET_LIB_FUNC() for an explanation
|
||||
* for why we disable -Wpedantic here.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
H5_GCC_DIAG_OFF(pedantic)
|
||||
herr_t
|
||||
H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found, const void **plugin_info)
|
||||
{
|
||||
@ -303,5 +302,5 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5PL__find_plugin_in_cache() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(pedantic)
|
||||
|
||||
|
@ -2353,7 +2353,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hid_t
|
||||
H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
|
||||
H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5O_layout_t layout; /* Layout information */
|
||||
@ -2361,7 +2361,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
|
||||
hid_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("i", "iz", dcpl_id, index);
|
||||
H5TRACE2("i", "iz", dcpl_id, idx);
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
|
||||
@ -2374,10 +2374,10 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
|
||||
|
||||
/* Get the virtual space */
|
||||
if(index >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
|
||||
if(idx >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
|
||||
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
|
||||
if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_dset.virtual_select, FALSE, TRUE)))
|
||||
if(NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE)))
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
|
||||
|
||||
/* Register ID */
|
||||
@ -2411,7 +2411,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hid_t
|
||||
H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
|
||||
H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5O_layout_t layout; /* Layout information */
|
||||
@ -2419,7 +2419,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
|
||||
hid_t ret_value = FAIL; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("i", "iz", dcpl_id, index);
|
||||
H5TRACE2("i", "iz", dcpl_id, idx);
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
|
||||
@ -2431,28 +2431,28 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
|
||||
if(H5D_VIRTUAL != layout.type)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
|
||||
|
||||
/* Check index */
|
||||
if(index >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
|
||||
/* Check idx */
|
||||
if(idx >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
|
||||
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
|
||||
|
||||
/* Attempt to open source dataset and patch extent if extent status is not
|
||||
* H5O_VIRTUAL_STATUS_CORRECT? -NAF */
|
||||
/* If source space status is H5O_VIRTUAL_STATUS_INVALID, patch with bounds
|
||||
* of selection */
|
||||
if((H5O_VIRTUAL_STATUS_INVALID == layout.storage.u.virt.list[index].source_space_status)
|
||||
&& (layout.storage.u.virt.list[index].unlim_dim_source < 0)) {
|
||||
if((H5O_VIRTUAL_STATUS_INVALID == layout.storage.u.virt.list[idx].source_space_status)
|
||||
&& (layout.storage.u.virt.list[idx].unlim_dim_source < 0)) {
|
||||
hsize_t bounds_start[H5S_MAX_RANK];
|
||||
hsize_t bounds_end[H5S_MAX_RANK];
|
||||
int rank;
|
||||
int i;
|
||||
|
||||
/* Get rank of source space */
|
||||
if((rank = H5S_GET_EXTENT_NDIMS(layout.storage.u.virt.list[index].source_select)) < 0)
|
||||
if((rank = H5S_GET_EXTENT_NDIMS(layout.storage.u.virt.list[idx].source_select)) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get source space rank")
|
||||
|
||||
/* Get bounds of selection */
|
||||
if(H5S_SELECT_BOUNDS(layout.storage.u.virt.list[index].source_select, bounds_start, bounds_end) < 0)
|
||||
if(H5S_SELECT_BOUNDS(layout.storage.u.virt.list[idx].source_select, bounds_start, bounds_end) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection bounds")
|
||||
|
||||
/* Adjust bounds to extent */
|
||||
@ -2460,15 +2460,15 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
|
||||
bounds_end[i]++;
|
||||
|
||||
/* Set extent */
|
||||
if(H5S_set_extent_simple(layout.storage.u.virt.list[index].source_select, (unsigned)rank, bounds_end, NULL) < 0)
|
||||
if(H5S_set_extent_simple(layout.storage.u.virt.list[idx].source_select, (unsigned)rank, bounds_end, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set source space extent")
|
||||
|
||||
/* Update source space status */
|
||||
layout.storage.u.virt.list[index].source_space_status = H5O_VIRTUAL_STATUS_SEL_BOUNDS;
|
||||
layout.storage.u.virt.list[idx].source_space_status = H5O_VIRTUAL_STATUS_SEL_BOUNDS;
|
||||
} /* end if */
|
||||
|
||||
/* Get the source space */
|
||||
if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE)))
|
||||
if(NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_select, FALSE, TRUE)))
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection")
|
||||
|
||||
/* Register ID */
|
||||
@ -2515,7 +2515,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
ssize_t
|
||||
H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/,
|
||||
H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name/*out*/,
|
||||
size_t size)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
@ -2523,7 +2523,7 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/,
|
||||
ssize_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE4("Zs", "izxz", dcpl_id, index, name, size);
|
||||
H5TRACE4("Zs", "izxz", dcpl_id, idx, name, size);
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
|
||||
@ -2536,13 +2536,13 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
|
||||
|
||||
/* Get the virtual filename */
|
||||
if(index >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
|
||||
if(idx >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
|
||||
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
|
||||
HDassert(layout.storage.u.virt.list[index].source_file_name);
|
||||
HDassert(layout.storage.u.virt.list[idx].source_file_name);
|
||||
if(name && (size > 0))
|
||||
(void)HDstrncpy(name, layout.storage.u.virt.list[index].source_file_name, size);
|
||||
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_file_name);
|
||||
(void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_file_name, size);
|
||||
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_file_name);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -2578,7 +2578,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
ssize_t
|
||||
H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/,
|
||||
H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name/*out*/,
|
||||
size_t size)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
@ -2586,7 +2586,7 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/,
|
||||
ssize_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE4("Zs", "izxz", dcpl_id, index, name, size);
|
||||
H5TRACE4("Zs", "izxz", dcpl_id, idx, name, size);
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
|
||||
@ -2599,13 +2599,13 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
|
||||
|
||||
/* Get the virtual filename */
|
||||
if(index >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
|
||||
if(idx >= layout.storage.u.virt.list_nused)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
|
||||
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
|
||||
HDassert(layout.storage.u.virt.list[index].source_dset_name);
|
||||
HDassert(layout.storage.u.virt.list[idx].source_dset_name);
|
||||
if(name && (size > 0))
|
||||
(void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset_name, size);
|
||||
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset_name);
|
||||
(void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size);
|
||||
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_dset_name);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
|
@ -530,8 +530,7 @@ done:
|
||||
* the code below, but early (4.4.7, at least) gcc only allows
|
||||
* diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
H5_GCC_DIAG_OFF(duplicated-branches)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T__get_native_integer
|
||||
@ -672,7 +671,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_integer() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(duplicated-branches)
|
||||
|
||||
/* Disable warning for intentional identical branches here -QAK */
|
||||
/*
|
||||
@ -680,8 +679,7 @@ done:
|
||||
* the code below, but early (4.4.7, at least) gcc only allows
|
||||
* diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
H5_GCC_DIAG_OFF(duplicated-branches)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T__get_native_float
|
||||
@ -806,7 +804,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_float() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(duplicated-branches)
|
||||
|
||||
/* Disable warning for intentional identical branches here -QAK */
|
||||
/*
|
||||
@ -814,8 +812,7 @@ done:
|
||||
* the code below, but early (4.4.7, at least) gcc only allows
|
||||
* diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
H5_GCC_DIAG_OFF(duplicated-branches)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T__get_native_bitfield
|
||||
@ -901,7 +898,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_bitfield() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(duplicated-branches)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -207,12 +207,12 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
|
||||
/* H5Fget_fileno */
|
||||
case H5VL_FILE_GET_FILENO:
|
||||
{
|
||||
unsigned long *fileno = HDva_arg(arguments, unsigned long *);
|
||||
unsigned long *fno = HDva_arg(arguments, unsigned long *);
|
||||
unsigned long my_fileno = 0;
|
||||
|
||||
f = (H5F_t *)obj;
|
||||
H5F_GET_FILENO(f, my_fileno);
|
||||
*fileno = my_fileno; /* sigh */
|
||||
*fno = my_fileno; /* sigh */
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -2788,22 +2788,24 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
|
||||
|
||||
/* Release requests that have completed */
|
||||
if(H5VL_REQUEST_WAITANY == specific_type) {
|
||||
size_t *index; /* Pointer to the index of completed request */
|
||||
size_t *idx; /* Pointer to the index of completed request */
|
||||
H5ES_status_t *status; /* Pointer to the request's status */
|
||||
|
||||
/* Retrieve the remaining arguments */
|
||||
index = va_arg(tmp_arguments, size_t *);
|
||||
assert(*index <= req_count);
|
||||
idx = va_arg(tmp_arguments, size_t *);
|
||||
assert(*idx <= req_count);
|
||||
status = va_arg(tmp_arguments, H5ES_status_t *);
|
||||
|
||||
/* Reissue the WAITANY 'request specific' call */
|
||||
ret_value = H5VL_pass_through_request_specific_reissue(o->under_object, o->under_vol_id, specific_type, req_count, under_req_array, timeout, index, status);
|
||||
ret_value = H5VL_pass_through_request_specific_reissue(o->under_object, o->under_vol_id, specific_type, req_count, under_req_array, timeout,
|
||||
idx,
|
||||
status);
|
||||
|
||||
/* Release the completed request, if it completed */
|
||||
if(ret_value >= 0 && *status != H5ES_STATUS_IN_PROGRESS) {
|
||||
H5VL_pass_through_t *tmp_o;
|
||||
|
||||
tmp_o = (H5VL_pass_through_t *)req_array[*index];
|
||||
tmp_o = (H5VL_pass_through_t *)req_array[*idx];
|
||||
H5VL_pass_through_free_obj(tmp_o);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
@ -49,7 +49,7 @@ static const char *FileHeader = "\n\
|
||||
/* Disable warning about cast increasing the alignment of the target type,
|
||||
* that's _exactly_ what this code is probing. -QAK
|
||||
*/
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
H5_GCC_DIAG_OFF(cast-align)
|
||||
|
||||
#if defined(__has_attribute)
|
||||
# if __has_attribute(no_sanitize_address)
|
||||
@ -1707,3 +1707,4 @@ main(int argc, char *argv[])
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
H5_GCC_DIAG_ON(cast-align)
|
||||
|
@ -107,8 +107,7 @@ static hbool_t H5_ntzset = FALSE;
|
||||
* format_templ in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
int
|
||||
HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
{
|
||||
@ -460,7 +459,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
HDva_end(ap);
|
||||
return nout;
|
||||
} /* end HDfprintf() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -281,8 +281,7 @@ error:
|
||||
* 'name' in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static int
|
||||
enough_room(hid_t fapl)
|
||||
{
|
||||
@ -323,7 +322,7 @@ done:
|
||||
|
||||
return ret_value;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -329,8 +329,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
|
||||
* 'full_desc' in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static herr_t
|
||||
test_long_desc(void)
|
||||
{
|
||||
@ -385,7 +384,7 @@ error:
|
||||
|
||||
return -1;
|
||||
} /* end test_long_desc() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -545,8 +545,7 @@ get_fill_size(const fheap_test_param_t *tparam)
|
||||
* test_desc in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static int
|
||||
begin_test(fheap_test_param_t *tparam, const char *base_desc,
|
||||
fheap_heap_ids_t *keep_ids, size_t *fill_size)
|
||||
@ -575,7 +574,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc,
|
||||
/* Success */
|
||||
return(0);
|
||||
} /* end begin_test() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -678,8 +678,7 @@ error:
|
||||
* 'member_file_name' in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static int
|
||||
test_get_file_image(const char * test_banner,
|
||||
const int file_name_num,
|
||||
@ -946,7 +945,7 @@ test_get_file_image(const char * test_banner,
|
||||
error:
|
||||
return 1;
|
||||
} /* end test_get_file_image() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -196,8 +196,7 @@ h5_clean_files(const char *base_name[], hid_t fapl)
|
||||
* sub_filename in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
void
|
||||
h5_delete_test_file(const char *base_name, hid_t fapl)
|
||||
{
|
||||
@ -247,7 +246,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl)
|
||||
|
||||
return;
|
||||
} /* end h5_delete_test_file() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1358,8 +1357,7 @@ h5_dump_info_object(MPI_Info info)
|
||||
* temp in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
h5_stat_size_t
|
||||
h5_get_file_size(const char *filename, hid_t fapl)
|
||||
{
|
||||
@ -1461,7 +1459,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
|
||||
|
||||
return(-1);
|
||||
} /* end get_file_size() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
/*
|
||||
* This routine is designed to provide equivalent functionality to 'printf'
|
||||
|
15
test/vfd.c
15
test/vfd.c
@ -779,8 +779,7 @@ error:
|
||||
* 'first_name' in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static herr_t
|
||||
test_family_opens(char *fname, hid_t fa_pl)
|
||||
{
|
||||
@ -837,7 +836,7 @@ test_family_opens(char *fname, hid_t fa_pl)
|
||||
error:
|
||||
return -1;
|
||||
} /* end test_family_opens() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1061,8 +1060,7 @@ error:
|
||||
* 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static herr_t
|
||||
test_family_compat(void)
|
||||
{
|
||||
@ -1146,7 +1144,7 @@ error:
|
||||
|
||||
return -1;
|
||||
} /* end test_family_compat() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1285,8 +1283,7 @@ error:
|
||||
* 'sf_name' in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static herr_t
|
||||
test_multi_opens(char *fname)
|
||||
{
|
||||
@ -1304,7 +1301,7 @@ test_multi_opens(char *fname)
|
||||
|
||||
return(fid >= 0 ? FAIL : SUCCEED);
|
||||
} /* end test_multi_opens() */
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -155,7 +155,7 @@ static void print_char_pos(int *ph, int pp, hsize_t curr_pos, size_t u,
|
||||
hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, const char *obj1,
|
||||
const char *obj2);
|
||||
static void h5diff_print_char(char ch);
|
||||
static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t idx,
|
||||
int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos,
|
||||
diff_opt_t *opts, const char *obj1, const char *obj2,
|
||||
hid_t container1_id, hid_t container2_id, /*where the reference came from*/
|
||||
@ -410,9 +410,11 @@ hsize_t diff_array(void *_mem1, void *_mem2, hsize_t nelmts, hsize_t hyper_start
|
||||
* Dereference the object and compare the type (basic object type).
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, int rank,
|
||||
hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2,
|
||||
hid_t container1_id, hid_t container2_id,
|
||||
static hsize_t
|
||||
diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t idx, int rank,
|
||||
hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts,
|
||||
const char *obj1, const char *obj2,
|
||||
hid_t container1_id, hid_t container2_id,
|
||||
int *ph, /*print header */
|
||||
mcomp_t *members) /*compound members */
|
||||
{
|
||||
@ -472,7 +474,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
offset = members->offsets[j];
|
||||
memb_type = members->ids[j];
|
||||
|
||||
nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, index,
|
||||
nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, idx,
|
||||
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members->m[j]);
|
||||
}
|
||||
}
|
||||
@ -576,11 +578,11 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (size1 != size2)
|
||||
if (print_data(opts))
|
||||
for (u = size; u < sizex; u++)
|
||||
character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
character_compare(s + u, sx + u, idx, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
}
|
||||
else
|
||||
for (u = 0; u < size; u++)
|
||||
nfound += character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
nfound += character_compare(s + u, sx + u, idx, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
} /* end check for NULL pointer for string */
|
||||
}
|
||||
break;
|
||||
@ -593,7 +595,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
H5TOOLS_DEBUG("diff_datum H5T_BITFIELD");
|
||||
/* byte-by-byte comparison */
|
||||
for (u = 0; u < type_size; u++)
|
||||
nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
break;
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -604,7 +606,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
H5TOOLS_DEBUG("diff_datum H5T_OPAQUE");
|
||||
/* byte-by-byte comparison */
|
||||
for (u = 0; u < type_size; u++)
|
||||
nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
break;
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -645,7 +647,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
*/
|
||||
nfound += 1;
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(S_FORMAT, enum_name1, enum_name2);
|
||||
}
|
||||
@ -655,14 +657,14 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (HDstrcmp(enum_name1, enum_name2) != 0) {
|
||||
nfound = 1;
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(S_FORMAT, enum_name1, enum_name2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (u = 0; u < type_size; u++)
|
||||
nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph);
|
||||
}
|
||||
}
|
||||
/* enable error reporting */
|
||||
@ -692,7 +694,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
for (u = 0, nelmts = 1; u < (unsigned) ndims; u++)
|
||||
nelmts *= adims[u];
|
||||
for (u = 0; u < nelmts; u++) {
|
||||
nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, index,
|
||||
nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, idx,
|
||||
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members);
|
||||
}
|
||||
H5Tclose(memb_type);
|
||||
@ -1102,7 +1104,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
nelmts = ((hvl_t *)((void *)mem1))->len;
|
||||
|
||||
for (j = 0; j < nelmts; j++)
|
||||
nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, index, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
|
||||
nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, idx, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
|
||||
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members);
|
||||
|
||||
H5Tclose(memb_type);
|
||||
@ -1132,7 +1134,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (ABS(temp1_char-temp2_char) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
|
||||
}
|
||||
@ -1145,7 +1147,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
|
||||
}
|
||||
@ -1153,7 +1155,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per);
|
||||
}
|
||||
@ -1166,7 +1168,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
|
||||
}
|
||||
@ -1174,7 +1176,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_char - temp2_char) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per);
|
||||
}
|
||||
@ -1183,7 +1185,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_char != temp2_char) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
|
||||
}
|
||||
@ -1208,7 +1210,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
|
||||
}
|
||||
@ -1221,7 +1223,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
|
||||
}
|
||||
@ -1229,7 +1231,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
|
||||
}
|
||||
@ -1242,7 +1244,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
|
||||
}
|
||||
@ -1250,7 +1252,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
|
||||
}
|
||||
@ -1259,7 +1261,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_uchar != temp2_uchar) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
|
||||
}
|
||||
@ -1284,7 +1286,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (ABS(temp1_short - temp2_short) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
|
||||
}
|
||||
@ -1297,7 +1299,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
|
||||
}
|
||||
@ -1305,7 +1307,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per);
|
||||
}
|
||||
@ -1318,7 +1320,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
|
||||
}
|
||||
@ -1326,7 +1328,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_short - temp2_short) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per);
|
||||
}
|
||||
@ -1335,7 +1337,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_short != temp2_short) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
|
||||
}
|
||||
@ -1360,7 +1362,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
|
||||
}
|
||||
@ -1373,7 +1375,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
|
||||
}
|
||||
@ -1381,7 +1383,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per);
|
||||
}
|
||||
@ -1394,7 +1396,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
|
||||
}
|
||||
@ -1402,7 +1404,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per);
|
||||
}
|
||||
@ -1411,7 +1413,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_ushort != temp2_ushort) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
|
||||
}
|
||||
@ -1436,7 +1438,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (ABS(temp1_int-temp2_int) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
|
||||
}
|
||||
@ -1449,7 +1451,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
|
||||
}
|
||||
@ -1457,7 +1459,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per);
|
||||
}
|
||||
@ -1470,7 +1472,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
|
||||
}
|
||||
@ -1478,7 +1480,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_int - temp2_int) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per);
|
||||
}
|
||||
@ -1487,7 +1489,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_int != temp2_int) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
|
||||
}
|
||||
@ -1512,7 +1514,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (PDIFF(temp1_uint, temp2_uint) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
|
||||
}
|
||||
@ -1525,7 +1527,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
|
||||
}
|
||||
@ -1533,7 +1535,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per);
|
||||
}
|
||||
@ -1546,7 +1548,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
|
||||
}
|
||||
@ -1554,7 +1556,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && PDIFF(temp1_uint,temp2_uint) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per);
|
||||
}
|
||||
@ -1563,7 +1565,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_uint != temp2_uint) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
|
||||
}
|
||||
@ -1588,7 +1590,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (ABS(temp1_long-temp2_long) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
|
||||
}
|
||||
@ -1601,7 +1603,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
|
||||
}
|
||||
@ -1609,7 +1611,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per);
|
||||
}
|
||||
@ -1622,7 +1624,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
|
||||
}
|
||||
@ -1630,7 +1632,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_long-temp2_long) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per);
|
||||
}
|
||||
@ -1639,7 +1641,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_long != temp2_long) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
|
||||
}
|
||||
@ -1664,7 +1666,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (opts->d && !opts->p) {
|
||||
if (PDIFF(temp1_ulong, temp2_ulong) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
|
||||
}
|
||||
@ -1677,7 +1679,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
|
||||
}
|
||||
@ -1685,7 +1687,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per);
|
||||
}
|
||||
@ -1698,7 +1700,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
|
||||
}
|
||||
@ -1706,7 +1708,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && PDIFF(temp1_ulong,temp2_ulong) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per);
|
||||
}
|
||||
@ -1715,7 +1717,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (temp1_ulong != temp2_ulong) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
|
||||
}
|
||||
@ -1766,7 +1768,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (!isnan1 && !isnan2) {
|
||||
if (ABS(temp1_float-temp2_float) > (float) opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1776,7 +1778,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1803,7 +1805,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1811,7 +1813,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && (double) ABS(temp1_float - temp2_float) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float,
|
||||
(double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float));
|
||||
@ -1822,7 +1824,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1849,7 +1851,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1857,7 +1859,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float,
|
||||
(double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float));
|
||||
@ -1868,7 +1870,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1881,7 +1883,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
*/
|
||||
else if (equal_float(temp1_float, temp2_float, opts) == FALSE) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
|
||||
}
|
||||
@ -1924,7 +1926,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (!isnan1 && !isnan2) {
|
||||
if (ABS(temp1_double-temp2_double) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -1934,7 +1936,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -1961,7 +1963,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -1969,7 +1971,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
|
||||
}
|
||||
@ -1979,7 +1981,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2006,7 +2008,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2015,7 +2017,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
else if (per > opts->percent &&
|
||||
ABS(temp1_double-temp2_double) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
|
||||
}
|
||||
@ -2025,7 +2027,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2038,7 +2040,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
*/
|
||||
else if (equal_double(temp1_double, temp2_double, opts) == FALSE) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2085,7 +2087,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
if (!isnan1 && !isnan2) {
|
||||
if (ABS(temp1_double-temp2_double) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2095,7 +2097,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2122,7 +2124,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2130,7 +2132,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
|
||||
}
|
||||
@ -2140,7 +2142,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2167,7 +2169,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
|
||||
if (not_comparable && !both_zero) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2175,7 +2177,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
}
|
||||
else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
|
||||
}
|
||||
@ -2185,7 +2187,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
/* only one is NaN, assume difference */
|
||||
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
@ -2198,7 +2200,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
|
||||
*/
|
||||
else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) {
|
||||
if (print_data(opts)) {
|
||||
print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
|
||||
print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
|
||||
parallel_print(SPACES);
|
||||
parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
|
||||
}
|
||||
|
@ -1268,8 +1268,7 @@ done:
|
||||
* 'temp' in the code below, but early (4.4.7, at least) gcc only
|
||||
* allows diagnostic pragmas to be toggled outside of functions.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
H5_GCC_DIAG_OFF(format-nonliteral)
|
||||
static void
|
||||
do_cleanupfile(iotype iot, char *filename)
|
||||
{
|
||||
@ -1331,5 +1330,5 @@ do_cleanupfile(iotype iot, char *filename)
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
H5_GCC_DIAG_ON(format-nonliteral)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user