summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-09 04:14:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-09 04:14:29 (GMT)
commit20720af231c875330a6074f65ee1c54e6a806fbb (patch)
tree64ae80f3ab6b76c09e2c309e76eb161cf133eed4 /hl/c++
parent25d1056dbff92a7662ee73c67596d24906530dbc (diff)
downloadhdf5-20720af231c875330a6074f65ee1c54e6a806fbb.zip
hdf5-20720af231c875330a6074f65ee1c54e6a806fbb.tar.gz
hdf5-20720af231c875330a6074f65ee1c54e6a806fbb.tar.bz2
[svn-r12735] Description:
Clean up some compiler warnings and resolve some inconsistenceis between hsize_t and size_t in the interface. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/FORTRAN & C++ Linux/64 2.4 (mir) w/enable-1.6-compat
Diffstat (limited to 'hl/c++')
-rw-r--r--hl/c++/src/H5PacketTable.cpp24
-rw-r--r--hl/c++/src/H5PacketTable.h26
2 files changed, 25 insertions, 25 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index dc34995..abe9519 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -81,7 +81,7 @@
* Sets the index to point to the packet specified by index.
* Returns 0 on success, negative on failure (if index is out of bounds)
*/
- int PacketTable::SetIndex(unsigned int index)
+ int PacketTable::SetIndex(hsize_t index)
{
return H5PTset_index(table_id, index);
}
@@ -90,7 +90,7 @@
* Sets the index to point to the packet specified by index.
* Returns 0 on success, negative on failure (if index is out of bounds)
*/
- int PacketTable::GetIndex(int &error)
+ hsize_t PacketTable::GetIndex(int &error)
{
hsize_t index;
@@ -157,7 +157,7 @@
* to be added and a pointer to their location in memory.
* Returns 0 on success, -1 on failure.
*/
- int FL_PacketTable::AppendPackets(unsigned int numPackets, void * data)
+ int FL_PacketTable::AppendPackets(size_t numPackets, void * data)
{
return H5PTappend(table_id, numPackets, data);
}
@@ -168,7 +168,7 @@
* to memory where the data should be stored.
* Returns 0 on success, negative on failure
*/
- int FL_PacketTable::GetPacket(unsigned int index, void * data)
+ int FL_PacketTable::GetPacket(hsize_t index, void * data)
{
return H5PTread_packets(table_id, index, 1, data);
}
@@ -179,7 +179,7 @@
* the memory where these packets should be stored.
* Returns 0 on success, negative on failure.
*/
- int FL_PacketTable::GetPackets(unsigned int startIndex, unsigned int endIndex, void * data)
+ int FL_PacketTable::GetPackets(hsize_t startIndex, hsize_t endIndex, void * data)
{
// Make sure the range of indexes is valid
if (startIndex > endIndex)
@@ -205,7 +205,7 @@
* Returns 0 on success, negative on failure. Index
* is not advanced on failure.
*/
- int FL_PacketTable::GetNextPackets(unsigned int numPackets, void * data)
+ int FL_PacketTable::GetNextPackets(size_t numPackets, void * data)
{
return H5PTget_next(table_id, numPackets, data);
}
@@ -244,7 +244,7 @@
* in bytes.
* Returns 0 on success, negative on failure.
*/
- int VL_PacketTable::AppendPacket(void * data, unsigned int length)
+ int VL_PacketTable::AppendPacket(void * data, size_t length)
{
hvl_t packet;
@@ -260,7 +260,7 @@
* packets to be added and a pointer to an array of hvl_t structs in memory.
* Returns 0 on success, negative on failure.
*/
- int VL_PacketTable::AppendPackets(unsigned int numPackets, hvl_t * data)
+ int VL_PacketTable::AppendPackets(size_t numPackets, hvl_t * data)
{
return H5PTappend(table_id, numPackets, data);
}
@@ -271,7 +271,7 @@
* to a hvl_t struct in which to store the packet's size and location.
* Returns 0 on success, negative on failure.
*/
- int VL_PacketTable::GetPacket(unsigned int index, hvl_t * data)
+ int VL_PacketTable::GetPacket(hsize_t index, hvl_t * data)
{
return H5PTread_packets(table_id, index, 1, data);
}
@@ -282,7 +282,7 @@
* of hvl_t structs in memory in which to store pointers to the packets.
* Returns 0 on success, negative on failure.
*/
- int VL_PacketTable::GetPackets(unsigned int startIndex, unsigned int endIndex, hvl_t * data)
+ int VL_PacketTable::GetPackets(hsize_t startIndex, hsize_t endIndex, hvl_t * data)
{
// Make sure the range of indexes is valid
if (startIndex > endIndex)
@@ -309,7 +309,7 @@
* Returns 0 on success, negative on failure. Index
* is not advanced on failure.
*/
- int VL_PacketTable::GetNextPackets(unsigned int numPackets, hvl_t * data)
+ int VL_PacketTable::GetNextPackets(size_t numPackets, hvl_t * data)
{
return H5PTget_next(table_id, numPackets, data);
}
@@ -320,7 +320,7 @@
* location in memory.
* Returns 0 on success, negative on error.
*/
- int VL_PacketTable::FreeReadbuff(unsigned int numStructs, hvl_t * buffer)
+ int VL_PacketTable::FreeReadbuff(size_t numStructs, hvl_t * buffer)
{
return H5PTfree_vlen_readbuff( table_id, numStructs, buffer);
}
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index cdfb3ee..5b4beec 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -72,13 +72,13 @@ public:
* Sets the current packet to point to the packet specified by index.
* Returns 0 on success, negative on failure (if index is out of bounds)
*/
- int SetIndex(unsigned int index);
+ int SetIndex(hsize_t index);
/* GetIndex
* Returns the position of the current packet.
* On failure, returns 0 and error is set to negative.
*/
- int GetIndex(int& error);
+ hsize_t GetIndex(int& error);
/* GetPacketCount
* Returns the number of packets in the packet table. Error
@@ -87,7 +87,7 @@ public:
*/
hsize_t GetPacketCount(int& error);
- unsigned int GetPacketCount()
+ hsize_t GetPacketCount()
{
int ignoreError;
return GetPacketCount(ignoreError);
@@ -127,7 +127,7 @@ public:
* to be added and a pointer to their location in memory.
* Returns 0 on success, -1 on failure.
*/
- int AppendPackets(unsigned int numPackets, void * data);
+ int AppendPackets(size_t numPackets, void * data);
/* GetPacket (indexed)
* Gets a single packet from the packet table. Takes the index
@@ -135,7 +135,7 @@ public:
* to memory where the data should be stored.
* Returns 0 on success, negative on failure
*/
- int GetPacket(unsigned int index, void * data);
+ int GetPacket(hsize_t index, void * data);
/* GetPackets (multiple packets)
* Gets multiple packets at once, all packets between
@@ -143,7 +143,7 @@ public:
* the memory where these packets should be stored.
* Returns 0 on success, negative on failure.
*/
- int GetPackets(unsigned int startIndex, unsigned int endIndex, void * data);
+ int GetPackets(hsize_t startIndex, hsize_t endIndex, void * data);
/* GetNextPacket (single packet)
* Gets the next packet in the packet table. Takes a pointer to
@@ -159,7 +159,7 @@ public:
* Returns 0 on success, negative on failure. Index
* is not advanced on failure.
*/
- int GetNextPackets(unsigned int numPackets, void * data);
+ int GetNextPackets(size_t numPackets, void * data);
};
class H5_HLCPPDLL VL_PacketTable : virtual public PacketTable
@@ -184,7 +184,7 @@ public:
* in bytes.
* Returns 0 on success, negative on failure.
*/
- int AppendPacket(void * data, unsigned int length);
+ int AppendPacket(void * data, size_t length);
/* AppendPackets (multiple packets)
* Adds multiple variable-length packets to the packet table. Takes the
@@ -192,7 +192,7 @@ public:
* hvl_t structs in memory.
* Returns 0 on success, negative on failure.
*/
- int AppendPackets(unsigned int numPackets, hvl_t * data);
+ int AppendPackets(size_t numPackets, hvl_t * data);
/* GetPacket (indexed)
* Gets a single variable-length packet from the packet table. Takes
@@ -200,7 +200,7 @@ public:
* to a hvl_t struct in which to store the packet's size and location.
* Returns 0 on success, negative on failure.
*/
- int GetPacket(unsigned int index, hvl_t * data);
+ int GetPacket(hsize_t index, hvl_t * data);
/* GetPackets (multiple packets)
* Gets multiple variable-length packets at once, all packets between
@@ -208,7 +208,7 @@ public:
* of hvl_t structs in memory in which to store pointers to the packets.
* Returns 0 on success, negative on failure.
*/
- int GetPackets(unsigned int startIndex, unsigned int endIndex, hvl_t * data);
+ int GetPackets(hsize_t startIndex, hsize_t endIndex, hvl_t * data);
/* GetNextPacket (single packet)
* Gets the next packet in the packet table. Takes a pointer to
@@ -225,7 +225,7 @@ public:
* Returns 0 on success, negative on failure. Index
* is not advanced on failure.
*/
- int GetNextPackets(unsigned int numPackets, hvl_t * data);
+ int GetNextPackets(size_t numPackets, hvl_t * data);
/* FreeReadbuff
* Frees the buffers created when variable-length packets are read.
@@ -233,7 +233,7 @@ public:
* location in memory.
* Returns 0 on success, negative on error.
*/
- int FreeReadbuff(unsigned int numStructs, hvl_t * buffer);
+ int FreeReadbuff(size_t numStructs, hvl_t * buffer);
};
#endif /* H5PTWRAP_H */