[svn-r3828] Purpose:

Code cleanup
Description:
    "buf" parameter to H5Awrite was missing 'const' declaration.
Solution:
    Changed from "void *buf" to "const void *buf"
Platforms tested:
    FreeBSD 4.3 (hawkwind)
This commit is contained in:
Quincey Koziol 2001-04-19 16:48:04 -05:00
parent ca9bdbdcbe
commit e0c96798a5
2 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ static herr_t H5A_init_interface(void);
static hid_t H5A_create(const H5G_entry_t *ent, const char *name, static hid_t H5A_create(const H5G_entry_t *ent, const char *name,
const H5T_t *type, const H5S_t *space); const H5T_t *type, const H5S_t *space);
static hid_t H5A_open(H5G_entry_t *ent, unsigned idx); static hid_t H5A_open(H5G_entry_t *ent, unsigned idx);
static herr_t H5A_write(H5A_t *attr, const H5T_t *mem_type, void *buf); static herr_t H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf);
static herr_t H5A_read(H5A_t *attr, const H5T_t *mem_type, void *buf); static herr_t H5A_read(H5A_t *attr, const H5T_t *mem_type, void *buf);
static int H5A_get_index(H5G_entry_t *ent, const char *name); static int H5A_get_index(H5G_entry_t *ent, const char *name);
@ -547,8 +547,8 @@ done:
USAGE USAGE
herr_t H5Awrite (attr_id, type_id, buf) herr_t H5Awrite (attr_id, type_id, buf)
hid_t attr_id; IN: Attribute to write hid_t attr_id; IN: Attribute to write
hid_t type_id; IN: Memory datatype of buffer hid_t type_id; IN: Memory datatype of buffer
void *buf; IN: Buffer of data to write const void *buf; IN: Buffer of data to write
RETURNS RETURNS
Non-negative on success/Negative on failure Non-negative on success/Negative on failure
@ -558,7 +558,7 @@ done:
This function writes a complete attribute to disk. This function writes a complete attribute to disk.
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
herr_t herr_t
H5Awrite(hid_t attr_id, hid_t type_id, void *buf) H5Awrite(hid_t attr_id, hid_t type_id, const void *buf)
{ {
H5A_t *attr = NULL; H5A_t *attr = NULL;
const H5T_t *mem_type = NULL; const H5T_t *mem_type = NULL;
@ -599,7 +599,7 @@ H5Awrite(hid_t attr_id, hid_t type_id, void *buf)
herr_t H5A_write (attr, mem_type, buf) herr_t H5A_write (attr, mem_type, buf)
H5A_t *attr; IN: Attribute to write H5A_t *attr; IN: Attribute to write
const H5T_t *mem_type; IN: Memory datatype of buffer const H5T_t *mem_type; IN: Memory datatype of buffer
void *buf; IN: Buffer of data to write const void *buf; IN: Buffer of data to write
RETURNS RETURNS
Non-negative on success/Negative on failure Non-negative on success/Negative on failure
@ -609,7 +609,7 @@ H5Awrite(hid_t attr_id, hid_t type_id, void *buf)
This function writes a complete attribute to disk. This function writes a complete attribute to disk.
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
static herr_t static herr_t
H5A_write(H5A_t *attr, const H5T_t *mem_type, void *buf) H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
{ {
uint8_t *tconv_buf = NULL; /* data type conv buffer */ uint8_t *tconv_buf = NULL; /* data type conv buffer */
uint8_t *bkg_buf = NULL; /* temp conversion buffer */ uint8_t *bkg_buf = NULL; /* temp conversion buffer */

View File

@ -31,7 +31,7 @@ __DLL__ hid_t H5Acreate(hid_t loc_id, const char *name, hid_t type_id,
hid_t space_id, hid_t plist_id); hid_t space_id, hid_t plist_id);
__DLL__ hid_t H5Aopen_name(hid_t loc_id, const char *name); __DLL__ hid_t H5Aopen_name(hid_t loc_id, const char *name);
__DLL__ hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); __DLL__ hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
__DLL__ herr_t H5Awrite(hid_t attr_id, hid_t type_id, void *buf); __DLL__ herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
__DLL__ herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); __DLL__ herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf);
__DLL__ herr_t H5Aclose(hid_t attr_id); __DLL__ herr_t H5Aclose(hid_t attr_id);
__DLL__ hid_t H5Aget_space(hid_t attr_id); __DLL__ hid_t H5Aget_space(hid_t attr_id);