summaryrefslogtreecommitdiffstats
path: root/hl/test/test_packet.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-10-21 14:08:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-10-21 14:08:13 (GMT)
commitd1117ac78c622908b4749218a991388d64f01f31 (patch)
tree35162f14a1505ff84ce9c088d270019991869896 /hl/test/test_packet.c
parentafd35119824638eeefc90c07286e49a45746e186 (diff)
downloadhdf5-d1117ac78c622908b4749218a991388d64f01f31.zip
hdf5-d1117ac78c622908b4749218a991388d64f01f31.tar.gz
hdf5-d1117ac78c622908b4749218a991388d64f01f31.tar.bz2
[svn-r19655] Description:
Bring r19654 from trunk to 1.8 branch: Bring Coverity revisions from branch back to trunk, and clean up some other misc. compiler warnings also. r19500: Fix coverity items 1446 and 1447. Moved up calls to memset in test_cont in ohdr.c so the test never tries to close uninitialized locations. r19501: Fix coverity items 1398-1445. Various uninitialized variable errors in fheap.c. r19502: Fixed coverity issue 579 and some additional warnings in the file as well. r19503: Bug fix: This fix addressed the "RESOURCE_LEAK" problems #789 and 790, run 26 r19504: minor mods to try to keep coverity from flagging false positives. r19505: Fixed coverity issues 566 - 571. Declared variables that are passed to functions that use them as arrays to be arrays of size 1. Tested on: Mac OS X/32 10.6.4 (amazon) w/debug, production & parallel (h5committested on coverity branch)
Diffstat (limited to 'hl/test/test_packet.c')
-rw-r--r--hl/test/test_packet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index 7a612a8..3c258c1 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -31,7 +31,9 @@
#define TEST_FILE_NAME "test_packet_table.h5"
#define TEST_COMPRESS_FILE "test_packet_compress.h5"
#define PT_NAME "Test Packet Table"
+#ifdef VLPT_REMOVED
#define VL_TABLE_NAME "Varlen Test Table"
+#endif /* VLPT_REMOVED */
#define H5TB_TABLE_NAME "Table1"
/*-------------------------------------------------------------------------
@@ -774,7 +776,7 @@ test_compress(void)
size_t c;
size_t num_elems = 1;
unsigned filter_vals[1];
- particle_t readPart;
+ particle_t readPart[1];
hsize_t count;
TESTING("packet table compression");
@@ -807,13 +809,14 @@ test_compress(void)
if( count != BIG_TABLE_SIZE ) TEST_ERROR;
/* Read particles to ensure that all of them were written correctly */
+ HDmemset(readPart, 0, sizeof(readPart));
for(c = 0; c < BIG_TABLE_SIZE; c++)
{
- err = H5PTget_next(table, 1, &readPart);
+ err = H5PTget_next(table, 1, readPart);
if(err < 0) TEST_ERROR;
/* Ensure that particles were read correctly */
- if( cmp_par(c % 8, 0, testPart, &readPart) != 0) TEST_ERROR;
+ if( cmp_par(c % 8, 0, testPart, readPart) != 0) TEST_ERROR;
}
/* Close the table */