summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LTparse.y
diff options
context:
space:
mode:
Diffstat (limited to 'hl/src/H5LTparse.y')
-rw-r--r--hl/src/H5LTparse.y13
1 files changed, 8 insertions, 5 deletions
diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y
index f5da780..50e8f6d 100644
--- a/hl/src/H5LTparse.y
+++ b/hl/src/H5LTparse.y
@@ -28,11 +28,14 @@ struct cmpd_info {
hbool_t is_field; /*flag to lexer for compound member*/
hbool_t first_memb; /*flag for first compound member*/
};
+
/*stack for nested compound type*/
-struct cmpd_info cmpd_stack[STACK_SIZE] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
- 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
- 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
- 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };
+struct cmpd_info cmpd_stack[STACK_SIZE] = {
+ {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1},
+ {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1},
+ {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1},
+ {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1} };
+
int csindex = -1; /*pointer to the top of compound stack*/
/*structure for array type information*/
@@ -161,7 +164,7 @@ memb_list :
memb_def : ddl_type { cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
'"' field_name '"' field_offset ';'
{
- int origin_size, new_size;
+ size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
/*Adjust size and insert member, consider both member size and offset.*/