63
63
 
64
64
 
    FUNC_ENTER_NOAPI(H5HL_debug, FAIL);
65
65
 
66
66
 
    /* check arguments */
67
67
 
    assert(f);
68
68
 
    assert(H5F_addr_defined(addr));
69
69
 
    assert(stream);
70
70
 
    assert(indent >= 0);
71
71
 
    assert(fwidth >= 0);
72
72
 
73
 
-
    if (NULL == (h = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ)))
 
73
+
    if (NULL == (h = (H5HL_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ)))
74
74
 
        HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap");
75
75
 
76
76
 
    fprintf(stream, "%*sLocal Heap...\n", indent, "");
77
77
 
    fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
78
78
 
        "Dirty:",
79
79
 
        (int) (h->cache_info.is_dirty));
80
80
 
    fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
81
81
 
        "Header size (in bytes):",
82
82
 
        (unsigned long) H5HL_SIZEOF_HDR(f));
83
83
 
    HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
84
84
 
          "Address of heap data:",
85
85
 
          h->addr);
86
86
 
    HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
87
87
 
        "Data bytes allocated for heap:",
88
88
 
            h->heap_alloc);
89
89
 
90
90
 
    /*
91
91
 
     * Traverse the free list and check that all free blocks fall within
92
92
 
     * the heap and that no two free blocks point to the same region of
93
93
 
     * the heap.  */
94
 
-
    if (NULL==(marker = H5MM_calloc(h->heap_alloc)))
 
94
+
    if (NULL==(marker = (uint8_t *)H5MM_calloc(h->heap_alloc)))
95
95
 
    HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
96
96
 
97
97
 
    fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
98
98
 
99
99
 
    for (free_block=0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) {
100
100
 
        char temp_str[32];
101
101
 
102
102
 
        sprintf(temp_str,"Block #%d:",free_block);
103
103
 
    HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9),
104
104
 
        temp_str,