From 18a398023aae0e93fe2e6d99c89af855a766f3e5 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Wed, 15 Mar 2006 16:42:02 -0500 Subject: [svn-r12094] Purpose: bug fix Description: long long type was being incorrectly printed Solution: added a long_long cast to print function Platforms tested: linux Misc. update: --- tools/lib/h5diff_array.c | 13 ++++++++----- tools/testfiles/h5diff_53.txt | 13 +++++++------ tools/testfiles/h5diff_54.txt | 13 +++++++------ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index f9f0da7..1bb48c3 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -3364,7 +3364,8 @@ hsize_t diff_llong(unsigned char *mem1, { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); - parallel_print(fmt_llong,temp1_llong,temp2_llong,labs((long)(temp1_llong-temp2_llong))); + parallel_print(fmt_llong,temp1_llong,temp2_llong, + (long_long)labs((long)(temp1_llong-temp2_llong))); } nfound++; } @@ -3392,7 +3393,7 @@ hsize_t diff_llong(unsigned char *mem1, print_pos(ph,1,i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); parallel_print(fmt_llongp,temp1_llong,temp2_llong,labs((long)(temp1_llong-temp2_llong)), - labs((long)(1-temp2_llong/temp1_llong))); + (long_long)labs((long)(1-temp2_llong/temp1_llong))); } nfound++; } @@ -3421,8 +3422,9 @@ hsize_t diff_llong(unsigned char *mem1, { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); - parallel_print(fmt_llongp,temp1_llong,temp2_llong,labs((long)(temp1_llong-temp2_llong)), - labs((long)(1-temp2_llong/temp1_llong))); + parallel_print(fmt_llongp,temp1_llong,temp2_llong, + (long_long)labs((long)(temp1_llong-temp2_llong)), + (long_long)labs((long)(1-temp2_llong/temp1_llong))); } nfound++; } @@ -3447,7 +3449,8 @@ hsize_t diff_llong(unsigned char *mem1, { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); parallel_print(SPACES); - parallel_print(fmt_llong,temp1_llong,temp2_llong,labs((long)(temp1_llong-temp2_llong))); + parallel_print(fmt_llong,temp1_llong,temp2_llong, + (long_long)labs((temp1_llong-temp2_llong))); } nfound++; } diff --git a/tools/testfiles/h5diff_53.txt b/tools/testfiles/h5diff_53.txt index 5f4aeee..cf094b6 100644 --- a/tools/testfiles/h5diff_53.txt +++ b/tools/testfiles/h5diff_53.txt @@ -8,9 +8,10 @@ Warning: Different storage datatype Warning: Different storage datatype has file datatype H5T_STD_I32LE has file datatype H5T_STD_I64LE -position dset3a dset4b difference relative ------------------------------------------------------------------------- -[ 1 0 ] 1 3 2 2 -[ 1 1 ] 1 5 4 4 -[ 2 1 ] 65 417 352 5 -6 differences found +position dset3a dset4b difference +------------------------------------------------------------ +[ 1 0 ] 1 3 2 +[ 1 1 ] 1 4 3 +[ 2 0 ] 1 5 4 +[ 2 1 ] 1 6 5 +4 differences found diff --git a/tools/testfiles/h5diff_54.txt b/tools/testfiles/h5diff_54.txt index e08aece..b2da2e3 100644 --- a/tools/testfiles/h5diff_54.txt +++ b/tools/testfiles/h5diff_54.txt @@ -2,9 +2,10 @@ Expected output for 'h5diff file4.h5 file4.h5 -v dset4a dset4b' ############################# Dataset: and -position dset4a dset4b difference relative ------------------------------------------------------------------------- -[ 1 0 ] 1 3 2 2 -[ 1 1 ] 1 5 4 4 -[ 2 1 ] 65 417 352 5 -6 differences found +position dset4a dset4b difference +------------------------------------------------------------ +[ 1 0 ] 1 3 2 +[ 1 1 ] 1 4 3 +[ 2 0 ] 1 5 4 +[ 2 1 ] 1 6 5 +4 differences found -- cgit v0.12