summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-05-30 07:03:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-05-30 07:03:37 (GMT)
commitcc95ed32fd506e06093b70ff8db47f21309d693c (patch)
tree7ad64419dfeea7380156b53cabecdc052f7ea92e /src
parent8e5447a185442fa9a5e977fc5be5c95e0b1866db (diff)
downloadhdf5-cc95ed32fd506e06093b70ff8db47f21309d693c.zip
hdf5-cc95ed32fd506e06093b70ff8db47f21309d693c.tar.gz
hdf5-cc95ed32fd506e06093b70ff8db47f21309d693c.tar.bz2
[svn-r29978] Description:
Bring r29914 from revise_chunks branch to trunk: Banished -Wformat= warnings from the library, tools, and tests. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
Diffstat (limited to 'src')
-rw-r--r--src/H5FDcore.c16
-rw-r--r--src/H5ST.c34
2 files changed, 27 insertions, 23 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 778baa0..865a29e 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -296,7 +296,7 @@ if(was_adjusted)
item->start = start;
item->end = end;
if(H5SL_insert(file->dirty_list, item, &item->start) < 0)
- HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't insert new dirty region: (%llu, %llu)\n", start, end)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't insert new dirty region: (%llu, %llu)\n", (unsigned long long)start, (unsigned long long)end)
}
else {
/* Store the new item endpoint if it's bigger */
@@ -755,11 +755,11 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
/* Allocate memory for the file's data, using the file image callback if available. */
if(file->fi_callbacks.image_malloc) {
if(NULL == (file->mem = (unsigned char*)file->fi_callbacks.image_malloc(size, H5FD_FILE_IMAGE_OP_FILE_OPEN, file->fi_callbacks.udata)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "image malloc callback failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "image malloc callback failed")
} /* end if */
else {
if(NULL == (file->mem = (unsigned char*)H5MM_malloc(size)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate memory block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "unable to allocate memory block")
} /* end else */
/* Set up data structures */
@@ -1288,11 +1288,11 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
/* (Re)allocate memory for the file buffer, using callbacks if available */
if(file->fi_callbacks.image_realloc) {
if(NULL == (x = (unsigned char *)file->fi_callbacks.image_realloc(file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes with callback", (unsigned long long)new_eof)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes with callback", (unsigned long long)new_eof)
} /* end if */
else {
if(NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
} /* end else */
HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
@@ -1307,7 +1307,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
haddr_t end = addr + (haddr_t)size - 1;
if(H5FD__core_add_dirty_region(file, start, end) != SUCCEED)
- HGOTO_ERROR(H5E_VFL, H5E_CANTINSERT, FAIL, "unable to add core VFD dirty region during write call - addresses: start=%llu end=%llu", start, end)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINSERT, FAIL, "unable to add core VFD dirty region during write call - addresses: start=%llu end=%llu", (unsigned long long)start, (unsigned long long)end)
}
/* Write from BUF to memory */
@@ -1460,11 +1460,11 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
/* (Re)allocate memory for the file buffer, using callback if available */
if(file->fi_callbacks.image_realloc) {
if(NULL == (x = (unsigned char *)file->fi_callbacks.image_realloc(file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block with callback")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block with callback")
} /* end if */
else {
if(NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block")
} /* end else */
if(file->eof < new_eof)
diff --git a/src/H5ST.c b/src/H5ST.c
index 7b61aa1..09c4600 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -23,6 +23,10 @@ Bentley and Robert Sedgewick in the April, 1998, Dr. Dobb's Journal.
#include "H5FLprivate.h" /* Free lists */
#include "H5STprivate.h" /* Ternary search trees */
+#ifdef H5ST_DEBUG
+static herr_t H5ST__dump_internal(H5ST_ptr_t p);
+#endif /* H5ST_DEBUG */
+
/* Declare a free list to manage the H5ST_node_t struct */
H5FL_DEFINE_STATIC(H5ST_node_t);
@@ -719,7 +723,7 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_dump_internal
+ H5ST__dump_internal
PURPOSE
Dump all the nodes of a TST
USAGE
@@ -735,30 +739,30 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
-H5ST_dump_internal(H5ST_ptr_t p)
+static herr_t
+H5ST__dump_internal(H5ST_ptr_t p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(p) {
- printf("p=%p\n", p);
- printf("\tp->up=%p\n", p->up);
- printf("\tp->parent=%p\n", p->parent);
- printf("\tp->lokid=%p\n", p->lokid);
- printf("\tp->hikid=%p\n", p->hikid);
- printf("\tp->eqkid=%p\n", p->eqkid);
+ printf("p=%p\n", (void *)p);
+ printf("\tp->up=%p\n", (void *)p->up);
+ printf("\tp->parent=%p\n", (void *)p->parent);
+ printf("\tp->lokid=%p\n", (void *)p->lokid);
+ printf("\tp->hikid=%p\n", (void *)p->hikid);
+ printf("\tp->eqkid=%p\n", (void *)p->eqkid);
printf("\tp->splitchar=%c\n", p->splitchar);
- H5ST_dump_internal(p->lokid);
+ H5ST__dump_internal(p->lokid);
if(p->splitchar)
- H5ST_dump_internal(p->eqkid);
+ H5ST__dump_internal(p->eqkid);
else
printf("%s\n", (char *)p->eqkid);
- H5ST_dump_internal(p->hikid);
+ H5ST__dump_internal(p->hikid);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5ST_dump_internal() */
+} /* end H5ST__dump_internal() */
/*--------------------------------------------------------------------------
@@ -785,7 +789,7 @@ H5ST_dump(H5ST_tree_t *tree)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Dump the tree */
- H5ST_dump_internal(tree->root);
+ H5ST__dump_internal(tree->root);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5ST_dump() */