summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5.c122
-rw-r--r--src/H5A.c12
-rw-r--r--src/H5Apkg.h4
-rw-r--r--src/H5E.c1
-rw-r--r--src/H5Epublic.h3
-rw-r--r--src/H5FL.c14
-rw-r--r--src/H5I.c16
-rw-r--r--src/H5Ipkg.h2
-rw-r--r--src/H5Oattr.c13
-rw-r--r--src/H5Oprivate.h6
-rw-r--r--src/H5private.h2
11 files changed, 99 insertions, 96 deletions
diff --git a/src/H5.c b/src/H5.c
index 72ea2a8..e72942c 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -14,6 +14,10 @@
#define H5I_PACKAGE /*suppress error about including H5Ipkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Bprivate.h" /* B-link trees */
#include "H5Dprivate.h" /* Datasets */
@@ -36,8 +40,6 @@
# include <sys/resource.h>
#endif
-#define PABLO_MASK H5_mask
-
/* statically initialize block for pthread_once call used in initializing */
/* the first global mutex */
#ifdef H5_HAVE_THREADSAFE
@@ -78,7 +80,7 @@ H5_init_library(void)
{
herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI(H5_init_library, FAIL);
+ FUNC_ENTER_NOAPI(H5_init_library, FAIL)
/*
* Make sure the package information is updated.
*/
@@ -127,7 +129,7 @@ H5_init_library(void)
* adding it again later if the library is cosed and reopened.
*/
if (!dont_atexit_g) {
- HDatexit(H5_term_library);
+ (void)HDatexit(H5_term_library);
dont_atexit_g = TRUE;
}
@@ -140,22 +142,22 @@ H5_init_library(void)
* property classes.
*/
if (H5P_init()<0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize property list interface");
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize property list interface")
if (H5F_init()<0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize file interface");
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize file interface")
if (H5T_init()<0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize datatype interface");
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize datatype interface")
if (H5D_init()<0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize dataset interface");
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize dataset interface")
if (H5AC_init()<0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize metadata caching interface");
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize metadata caching interface")
/* Debugging? */
H5_debug_mask("-all");
H5_debug_mask(HDgetenv("HDF5_DEBUG"));
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -194,7 +196,7 @@ H5_term_library(void)
goto done;
/* Check if we should display error output */
- H5Eget_auto(&func,NULL);
+ (void)H5Eget_auto(&func,NULL);
/*
* Terminate each interface. The termination functions return a positive
@@ -206,8 +208,8 @@ H5_term_library(void)
(sprintf(loop+at, "%s%s", at?",":"", #F), \
at += HDstrlen(loop+at), \
n): \
- ((n>0 && at+5<sizeof loop)? \
- (sprintf(loop+at, "..."), \
+ ((n>0 && at+5<sizeof loop)? \
+ (sprintf(loop+at, "..."), \
at += HDstrlen(loop+at), \
n):n))
@@ -311,16 +313,16 @@ H5dont_atexit(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API_NOINIT(H5dont_atexit);
+ FUNC_ENTER_API_NOINIT(H5dont_atexit)
H5TRACE0("e","");
if (dont_atexit_g)
- HGOTO_DONE(FAIL);
+ HGOTO_DONE(FAIL)
dont_atexit_g = TRUE;
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -351,14 +353,15 @@ H5garbage_collect(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5garbage_collect, FAIL);
+ FUNC_ENTER_API(H5garbage_collect, FAIL)
H5TRACE0("e","");
/* Call the garbage collection routines in the library */
- H5FL_garbage_coll();
+ if(H5FL_garbage_coll()<0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect objects")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5garbage_collect() */
@@ -397,15 +400,16 @@ H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5set_free_list_limits, FAIL);
+ FUNC_ENTER_API(H5set_free_list_limits, FAIL)
H5TRACE6("e","IsIsIsIsIsIs",reg_global_lim,reg_list_lim,arr_global_lim,
arr_list_lim,blk_global_lim,blk_list_lim);
/* Call the free list function to actually set the limits */
- H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
+ if(H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim)<0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "can't set garbage collection limits")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5set_free_list_limits() */
@@ -491,7 +495,7 @@ H5_debug_mask(const char *s)
} else if (HDisdigit(*s)) {
int fd = (int)HDstrtol (s, &rest, 0);
if ((stream=HDfdopen(fd, "w"))) {
- HDsetvbuf (stream, NULL, _IOLBF, 0);
+ (void)HDsetvbuf (stream, NULL, _IOLBF, 0);
}
s = rest;
} else {
@@ -529,7 +533,7 @@ H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5get_libversion, FAIL);
+ FUNC_ENTER_API(H5get_libversion, FAIL)
H5TRACE3("e","*Iu*Iu*Iu",majnum,minnum,relnum);
/* Set the version information */
@@ -538,7 +542,7 @@ H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
if (relnum) *relnum = H5_VERS_RELEASE;
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -573,12 +577,12 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
static int disable_version_check = 0; /* Set if the version check should be disabled */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API_NOINIT(H5check_version);
+ FUNC_ENTER_API_NOINIT(H5check_version)
H5TRACE3("e","IuIuIu",majnum,minnum,relnum);
/* Don't check again, if we already have */
if (checked)
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED)
if (H5_VERS_MAJOR!=majnum || H5_VERS_MINOR!=minnum ||
H5_VERS_RELEASE!=relnum) {
@@ -633,7 +637,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
if (*substr){
HDstrcat(lib_str, "-");
- HDstrncat(lib_str, substr, sizeof(lib_str) - HDstrlen(lib_str) - 1);
+ HDstrncat(lib_str, substr, (sizeof(lib_str) - HDstrlen(lib_str)) - 1);
} /* end if */
if (HDstrcmp(lib_str, H5_lib_vers_info_g)){
HDfputs ("Warning! Library version information error.\n"
@@ -648,7 +652,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -674,11 +678,11 @@ H5open(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5open, FAIL);
+ FUNC_ENTER_API(H5open, FAIL)
H5TRACE0("e","");
/* all work is done by FUNC_ENTER() */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -704,12 +708,12 @@ H5close(void)
* thing just to release it all right away. It is safe to call this
* function for an uninitialized library.
*/
- FUNC_ENTER_API_NOINIT(H5close);
+ FUNC_ENTER_API_NOINIT(H5close)
H5TRACE0("e","");
H5_term_library();
- FUNC_LEAVE_API(SUCCEED);
+ FUNC_LEAVE_API(SUCCEED)
}
@@ -752,7 +756,7 @@ HDsnprintf(char *buf, size_t UNUSED size, const char *fmt, ...)
n = HDvsprintf(buf, fmt, ap);
va_end(ap);
return n;
-}
+} /*lint !e715 */
#endif /* H5_HAVE_SNPRINTF */
@@ -782,10 +786,10 @@ HDsnprintf(char *buf, size_t UNUSED size, const char *fmt, ...)
*-------------------------------------------------------------------------
*/
int
-HDvsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
+HDvsnprintf(char *buf, size_t UNUSED size, const char *fmt, va_list ap)
{
return HDvsprintf(buf, fmt, ap);
-}
+} /*lint !e715 */
#endif /* H5_HAVE_VSNPRINTF */
@@ -867,7 +871,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case '#':
prefix = 1;
break;
- }
+ } /*lint !e744 Switch statement doesn't _need_ default */
s++;
}
@@ -901,6 +905,8 @@ HDfprintf(FILE *stream, const char *fmt, ...)
/* Type modifier */
if (HDstrchr ("ZHhlqLI", *s)) {
switch (*s) {
+ /*lint --e{506} Don't issue warnings about constant value booleans */
+ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */
case 'H':
if (sizeof(hsize_t)<sizeof(long)) {
modifier[0] = '\0';
@@ -970,7 +976,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'd':
case 'i':
if (!HDstrcmp(modifier, "h")) {
- short x = va_arg (ap, int);
+ short x = va_arg (ap, short);
n = fprintf (stream, format_templ, x);
} else if (!*modifier) {
int x = va_arg (ap, int);
@@ -989,7 +995,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'x':
case 'X':
if (!HDstrcmp (modifier, "h")) {
- unsigned short x = va_arg (ap, unsigned int);
+ unsigned short x = va_arg (ap, unsigned short);
n = fprintf (stream, format_templ, x);
} else if (!*modifier) {
unsigned int x = va_arg (ap, unsigned int);
@@ -1030,7 +1036,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
break;
case 'a':
- if (1) {
+ {
haddr_t x = va_arg (ap, haddr_t);
if (H5F_addr_defined(x)) {
sprintf(format_templ, "%%%s%s%s%s%s",
@@ -1040,6 +1046,8 @@ HDfprintf(FILE *stream, const char *fmt, ...)
if (fwidth>0) {
sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth);
}
+ /*lint --e{506} Don't issue warnings about constant value booleans */
+ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */
if (sizeof(x)==H5_SIZEOF_INT) {
HDstrcat(format_templ, "d");
} else if (sizeof(x)==H5_SIZEOF_LONG) {
@@ -1062,7 +1070,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
break;
case 'c':
- if (1) {
+ {
char x = (char)va_arg (ap, int);
n = fprintf (stream, format_templ, x);
}
@@ -1070,17 +1078,15 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 's':
case 'p':
- if (1) {
+ {
char *x = va_arg (ap, char*);
n = fprintf (stream, format_templ, x);
}
break;
case 'n':
- if (1) {
- format_templ[HDstrlen(format_templ)-1] = 'u';
- n = fprintf (stream, format_templ, nout);
- }
+ format_templ[HDstrlen(format_templ)-1] = 'u';
+ n = fprintf (stream, format_templ, nout);
break;
default:
@@ -1166,7 +1172,7 @@ HDstrtoll(const char *s, const char **rest, int base)
} else if ('-'==*s) {
sign = -1;
s++;
- }
+ }
/* Zero base prefix */
if (0==base && '0'==*s && ('x'==s[1] || 'X'==s[1])) {
@@ -1187,8 +1193,8 @@ HDstrtoll(const char *s, const char **rest, int base)
if (!overflow) {
int64_t digit = 0;
if (*s>='0' && *s<='9') digit = *s - '0';
- else if (*s>='a' && *s<='z') digit = *s-'a'+10;
- else digit = *s-'A'+10;
+ else if (*s>='a' && *s<='z') digit = (*s-'a')+10;
+ else digit = (*s-'A')+10;
if (acc*base+digit < acc) {
overflow = TRUE;
@@ -1437,7 +1443,7 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
*-------------------------------------------------------------------------
*/
double
-H5_trace (double *returning, const char *func, const char *type, ...)
+H5_trace (const double *returning, const char *func, const char *type, ...)
{
va_list ap;
char buf[64], *rest;
@@ -1448,7 +1454,7 @@ H5_trace (double *returning, const char *func, const char *type, ...)
void *vp = NULL;
FILE *out = H5_debug_g.trace;
H5_timer_t event_time;
- static H5_timer_t first_time;
+ static H5_timer_t first_time = {0.0, 0.0, 0.0};
static int current_depth=0;
static int last_call_depth=0;
@@ -1528,7 +1534,7 @@ H5_trace (double *returning, const char *func, const char *type, ...)
assert(']'==*rest);
type = rest+1;
} else {
- rest = HDstrchr(type, ']');
+ rest = (char *)HDstrchr(type, ']');
assert(rest);
type = rest+1;
asize_idx = -1;
@@ -1544,7 +1550,7 @@ H5_trace (double *returning, const char *func, const char *type, ...)
*/
argname = va_arg (ap, char*);
if (argname) {
- unsigned n = MAX (0, (int)HDstrlen(argname)-3);
+ unsigned n = (unsigned)MAX (0, (int)HDstrlen(argname)-3); /*lint !e666 Allow expression with side effects */
if (!HDstrcmp (argname+n, "_id")) {
HDstrncpy (buf, argname, MIN ((int)sizeof(buf)-1, n));
buf[MIN((int)sizeof(buf)-1, n)] = '\0';
@@ -2004,7 +2010,7 @@ H5_trace (double *returning, const char *func, const char *type, ...)
} else if (obj<0) {
fprintf (out, "FAIL");
} else {
- switch (H5I_GROUP(obj)) { /* Use internal H5I macro instead of function call */
+ switch (H5I_GRP(obj)) { /* Use internal H5I macro instead of function call */
case H5I_BADID:
fprintf (out, "%ld (error)", (long)obj);
break;
@@ -2190,10 +2196,10 @@ H5_trace (double *returning, const char *func, const char *type, ...)
if (vp) {
fprintf (out, "0x%lx", (unsigned long)vp);
if (asize_idx>=0 && asize[asize_idx]>=0) {
- int *p = (int*)vp;
+ unsigned *p = (unsigned*)vp;
fprintf(out, " {");
for (i=0; i<asize[asize_idx]; i++) {
- HDfprintf(out, "%s%Hu", i?", ":"", p[i]);
+ HDfprintf(out, "%s%u", i?", ":"", p[i]);
}
fprintf(out, "}");
}
@@ -2334,7 +2340,7 @@ H5_trace (double *returning, const char *func, const char *type, ...)
fprintf(out, "H5FD_MEM_OHDR");
break;
default:
- fprintf(out, "%lu", (unsigned long)mt);
+ fprintf(out, "%ld", (long)mt);
break;
}
}
@@ -2913,7 +2919,7 @@ H5_trace (double *returning, const char *func, const char *type, ...)
if (ptr) {
if (vp) {
fprintf (out, "0x%lx", (unsigned long)vp);
- if (vp && asize_idx>=0 && asize[asize_idx]>=0) {
+ if (asize_idx>=0 && asize[asize_idx]>=0) {
ssize_t *p = (ssize_t*)vp;
fprintf(out, " {");
for (i=0; i<asize[asize_idx]; i++) {
diff --git a/src/H5A.c b/src/H5A.c
index 75287c2..96c209f 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -15,21 +15,17 @@
#define H5A_PACKAGE /*suppress error about including H5Apkg */
#define H5S_PACKAGE /*suppress error about including H5Spkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5A_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
-#include "H5Bprivate.h" /* B-tree subclass names */
-#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Gprivate.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
-#include "H5Oprivate.h" /* Object Headers */
-#include "H5Pprivate.h" /* Property lists */
#include "H5Spkg.h" /* Dataspace functions */
-#include "H5Tprivate.h" /* Datatypes */
-
-#define PABLO_MASK H5A_mask
/* Is the interface initialized? */
static int interface_initialize_g = 0;
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index c66cf9c..9c837ab 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -38,8 +38,8 @@
#include "H5Aprivate.h"
/* Other private headers needed by this file */
-#include "H5HGprivate.h" /* Global heaps */
#include "H5Sprivate.h" /* Dataspace */
+#include "H5Tprivate.h" /* Datatype functions */
struct H5A_t {
unsigned initialized;/* Indicate whether the attribute has been modified */
@@ -52,8 +52,6 @@ struct H5A_t {
size_t ds_size; /* Size of dataspace on disk */
void *data; /* Attribute data (on a temporary basis) */
size_t data_size; /* Size of data on disk */
- H5HG_t sh_heap; /*if defined, attribute is in global heap */
- H5F_t *sh_file; /*file pointer if this is a shared attribute */
};
/* Function prototypes for H5A package scope */
diff --git a/src/H5E.c b/src/H5E.c
index eb8f17a..0607725 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -93,6 +93,7 @@ static const H5E_minor_mesg_t H5E_minor_mesg_g[] = {
{H5E_ALREADYEXISTS, "Object already exists"},
{H5E_CANTLOCK, "Unable to lock object"},
{H5E_CANTUNLOCK, "Unable to unlock object"},
+ {H5E_CANTGC, "Unable to garbage collect"},
/* File accessability errors */
{H5E_FILEEXISTS, "File already exists"},
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index 6840dd5..ee61a9f 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -121,9 +121,10 @@ typedef enum H5E_minor_t {
H5E_NOSPACE, /*no space available for allocation */
H5E_CANTCOPY, /*unable to copy object */
H5E_CANTFREE, /*unable to free object */
- H5E_ALREADYEXISTS, /*Object already exists */
+ H5E_ALREADYEXISTS, /*Object already exists */
H5E_CANTLOCK, /*Unable to lock object */
H5E_CANTUNLOCK, /*Unable to unlock object */
+ H5E_CANTGC, /*Unable to garbage collect */
/* File accessability errors */
H5E_FILEEXISTS, /*file already exists */
diff --git a/src/H5FL.c b/src/H5FL.c
index 8237a60..93fc902 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -1662,18 +1662,24 @@ printf("H5FL_arr_term: head->name=%s, head->allocated=%d\n", H5FL_arr_gc_head.fi
herr_t
H5FL_garbage_coll(void)
{
+ herr_t ret_value = SUCCEED;
+
FUNC_ENTER_NOINIT(H5FL_garbage_coll);
/* Garbage collect the free lists for array objects */
- H5FL_arr_gc();
+ if(H5FL_arr_gc()<0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect array objects")
/* Garbage collect free lists for blocks */
- H5FL_blk_gc();
+ if(H5FL_blk_gc()<0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect block objects")
/* Garbage collect the free lists for regular objects */
- H5FL_reg_gc();
+ if(H5FL_reg_gc()<0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect regular objects")
- FUNC_LEAVE_NOAPI(SUCCEED);
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
} /* end H5FL_garbage_coll() */
diff --git a/src/H5I.c b/src/H5I.c
index 4049843..7f255a3 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -403,7 +403,7 @@ H5I_clear_group(H5I_type_t grp, hbool_t force)
* Remove atoms from the global atom cache.
*/
for (i=0; i<ID_CACHE_SIZE; i++) {
- if (H5I_cache_g[i] && H5I_GROUP(H5I_cache_g[i]->id) == grp)
+ if (H5I_cache_g[i] && H5I_GRP(H5I_cache_g[i]->id) == grp)
H5I_cache_g[i] = NULL;
}
#endif /* IDS_ARE_CACHED */
@@ -740,7 +740,7 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
assert(id_type>=H5I_FILE && id_type<H5I_NGROUPS);
/* Verify that the group of the ID is correct & lookup the ID */
- if(id_type == H5I_GROUP(id) && NULL!=(id_ptr = H5I_find_id(id))) {
+ if(id_type == H5I_GRP(id) && NULL!=(id_ptr = H5I_find_id(id))) {
/* Get the object pointer to return */
ret_value = id_ptr->obj_ptr;
} /* end if */
@@ -777,7 +777,7 @@ H5I_get_type(hid_t id)
FUNC_ENTER_NOAPI(H5I_get_type, H5I_BADID);
if (id>0)
- ret_value = H5I_GROUP(id);
+ ret_value = H5I_GRP(id);
assert(ret_value>=H5I_BADID && ret_value<H5I_NGROUPS);
@@ -857,7 +857,7 @@ H5I_remove(hid_t id)
FUNC_ENTER_NOAPI(H5I_remove, NULL);
/* Check arguments */
- grp = H5I_GROUP(id);
+ grp = H5I_GRP(id);
if (grp <= H5I_BADID || grp >= H5I_NGROUPS)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid group number");
grp_ptr = H5I_id_group_list_g[grp];
@@ -950,7 +950,7 @@ done:
int
H5I_dec_ref(hid_t id)
{
- H5I_type_t grp = H5I_GROUP(id); /*group the object is in*/
+ H5I_type_t grp = H5I_GRP(id); /*group the object is in*/
H5I_id_group_t *grp_ptr = NULL; /*ptr to the group */
H5I_id_info_t *id_ptr = NULL; /*ptr to the new ID */
int ret_value=FAIL; /*return value */
@@ -1011,7 +1011,7 @@ done:
int
H5I_inc_ref(hid_t id)
{
- H5I_type_t grp = H5I_GROUP(id); /*group the object is in*/
+ H5I_type_t grp = H5I_GRP(id); /*group the object is in*/
H5I_id_group_t *grp_ptr = NULL; /*ptr to the group */
H5I_id_info_t *id_ptr = NULL; /*ptr to the ID */
int ret_value; /* Return value */
@@ -1126,7 +1126,7 @@ H5I_find_id(hid_t id)
FUNC_ENTER_NOINIT(H5I_find_id);
/* Check arguments */
- grp = H5I_GROUP(id);
+ grp = H5I_GRP(id);
if (grp <= H5I_BADID || grp >= H5I_NGROUPS)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid group number");
grp_ptr = H5I_id_group_list_g[grp];
@@ -1283,7 +1283,7 @@ H5I_debug(H5I_type_t grp)
/* Cache */
fprintf(stderr, " Cache:\n");
for (is=0; is<ID_CACHE_SIZE; is++) {
- if (H5I_cache_g[is] && H5I_GROUP(H5I_cache_g[is]->id)==grp) {
+ if (H5I_cache_g[is] && H5I_GRP(H5I_cache_g[is]->id)==grp) {
fprintf(stderr, " Entry-%d, ID=%lu\n",
is, (unsigned long)(H5I_cache_g[is]->id));
}
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index dc6d55a..aab865c 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -53,7 +53,7 @@
#define ID_MASK ((1<<ID_BITS)-1)
/* Map an atom to a Group number */
-#define H5I_GROUP(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & GROUP_MASK))
+#define H5I_GRP(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & GROUP_MASK))
/****************************/
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index df6e740..f1217a9 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -16,6 +16,10 @@
#define H5O_PACKAGE /*suppress error about including H5Opkg */
#define H5S_PACKAGE /*suppress error about including H5Spkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5O_attr_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
#include "H5Eprivate.h" /* Error handling */
@@ -25,8 +29,6 @@
#include "H5Opkg.h" /* Object headers */
#include "H5Spkg.h" /* Dataspaces */
-#define PABLO_MASK H5O_attr_mask
-
/* PRIVATE PROTOTYPES */
static herr_t H5O_attr_encode (H5F_t *f, uint8_t *p, const void *mesg);
static void *H5O_attr_decode (H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t *sh);
@@ -170,13 +172,6 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *
/* Indicate that the fill values aren't to be written out */
attr->initialized=1;
-#ifdef LOTSLATER
- if (hobj) {
- attr->sh_heap = *hobj;
- attr->sh_file = f;
- }
-#endif
-
/* Set return value */
ret_value=attr;
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index c19550f..d9d4e4f 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -35,9 +35,9 @@
#include "H5Spublic.h" /* Dataspace functions */
/* Private headers needed by this file */
-#include "H5private.h" /* Generic functions */
-#include "H5HGprivate.h" /* Global heap functions */
-#include "H5Tprivate.h" /* Datatype functions */
+#include "H5private.h" /* Generic functions */
+#include "H5HGprivate.h" /* Global heap functions */
+#include "H5Tprivate.h" /* Datatype functions */
#include "H5Zprivate.h" /* I/O pipeline filters */
/* Object header macros */
diff --git a/src/H5private.h b/src/H5private.h
index 7a709ef..fc73a6d 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -979,7 +979,7 @@ extern H5_debug_t H5_debug_g;
#define H5TRACE_RETURN(V) /*void*/
#endif
-H5_DLL double H5_trace(double *calltime, const char *func, const char *type, ...);
+H5_DLL double H5_trace(const double *calltime, const char *func, const char *type, ...);
/*-------------------------------------------------------------------------