Skip to content

Commit

Permalink
Added semi-colon to HGOTO_ERROR() by manually fixing the last ones
Browse files Browse the repository at this point in the history
  • Loading branch information
seanm committed Jul 29, 2023
1 parent e0d3ce1 commit 420ae22
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions bin/make_err
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ sub create_init ($) {
foreach $name (keys %major) {
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\")\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n";
}

# Iterate over all the minor error sections
Expand All @@ -259,9 +259,9 @@ sub create_init ($) {
for $name ( @{$section_list{$sect_name}}) {
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\")\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n";
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/H5EA.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
H5E_EARRAY, H5E_CANTDEPEND, FAIL,
"unable to create flush dependency between super block and header, address "
"= %llu",
(unsigned long long)sblock->addr)
(unsigned long long)sblock->addr);
sblock->has_hdr_depend = TRUE;
} /* end if */
} /* end if */
Expand Down Expand Up @@ -558,7 +558,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEPEND, FAIL,
"unable to create flush dependency between data block page and header, "
"index = %llu",
(unsigned long long)idx)
(unsigned long long)idx);
dblk_page->has_hdr_depend = TRUE;
} /* end if */

Expand Down
4 changes: 2 additions & 2 deletions src/H5EAcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL,
"unable to destroy flush dependency between data block page and header, "
"address = %llu",
(unsigned long long)dblk_page->addr)
(unsigned long long)dblk_page->addr);
dblk_page->has_hdr_depend = FALSE;
} /* end if */
break;
Expand All @@ -2087,7 +2087,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL,
"unable to destroy flush dependency between data block page and header, "
"address = %llu",
(unsigned long long)dblk_page->addr)
(unsigned long long)dblk_page->addr);
dblk_page->has_hdr_depend = FALSE;
} /* end if */

Expand Down
4 changes: 2 additions & 2 deletions src/H5FDint.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL,
"addr overflow, addrs[%d] = %llu, sizes[%d] = %llu, eoa = %llu", (int)i,
(unsigned long long)(addrs[i]), (int)i, (unsigned long long)size,
(unsigned long long)eoa)
(unsigned long long)eoa);
}
}

Expand Down Expand Up @@ -656,7 +656,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addrs[%d] = %llu, sizes[%d] = %llu, \
eoa = %llu",
(int)i, (unsigned long long)(addrs[i]), (int)i, (unsigned long long)size,
(unsigned long long)eoa)
(unsigned long long)eoa);
}

/* if the underlying VFD supports vector write, make the call */
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDonion_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *

if (revision_num != r_out->revision_num)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
"could not find target revision!") /* TODO: corrupted? */
"could not find target revision!"); /* TODO: corrupted? */
} /* end if revision ID at 'leaf' in binary search */

if (r_out->comment_size > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/H5Fsuper.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, FAIL,
"truncated file: eof = %llu, sblock->base_addr = %llu, stored_eof = %llu",
(unsigned long long)eof, (unsigned long long)sblock->base_addr,
(unsigned long long)udata.stored_eof)
(unsigned long long)udata.stored_eof);
}

/*
Expand Down
10 changes: 5 additions & 5 deletions src/H5Olayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,
"bad chunk dimension value when parsing layout message - chunk dimension "
"must be positive: mesg->u.chunk.dim[%u] = %u",
u, mesg->u.chunk.dim[u])
u, mesg->u.chunk.dim[u]);
}

/* Compute chunk size */
Expand Down Expand Up @@ -302,7 +302,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,
"bad chunk dimension value when parsing layout message - chunk "
"dimension must be positive: mesg->u.chunk.dim[%u] = %u",
u, mesg->u.chunk.dim[u])
u, mesg->u.chunk.dim[u]);
}

/* Compute chunk size */
Expand Down Expand Up @@ -362,7 +362,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,
"bad chunk dimension value when parsing layout message - chunk "
"dimension must be positive: mesg->u.chunk.dim[%u] = %u",
u, mesg->u.chunk.dim[u])
u, mesg->u.chunk.dim[u]);
}

/* Compute chunk size */
Expand Down Expand Up @@ -485,7 +485,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,
"bad value for v2 B-tree split percent value - must be > 0 and "
"<= 100: split percent = %" PRIu8,
mesg->u.chunk.u.btree2.cparam.split_percent)
mesg->u.chunk.u.btree2.cparam.split_percent);

if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,
Expand All @@ -497,7 +497,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,
"bad value for v2 B-tree merge percent value - must be > 0 and "
"<= 100: merge percent = %" PRIu8,
mesg->u.chunk.u.btree2.cparam.merge_percent)
mesg->u.chunk.u.btree2.cparam.merge_percent);

/* Set the chunk operations */
mesg->storage.u.chunk.ops = H5D_COPS_BT2;
Expand Down
6 changes: 3 additions & 3 deletions src/H5Tconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
if (NULL == (st = (H5T_t *)H5I_object(src_id)) || \
NULL == (dt = (H5T_t *)H5I_object(dst_id))) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
"unable to dereference datatype object ID") \
"unable to dereference datatype object ID"); \
if (st->shared->size != sizeof(ST) || dt->shared->size != sizeof(DT)) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "disagreement about datatype size"); \
CI_ALLOC_PRIV \
Expand Down Expand Up @@ -769,13 +769,13 @@
/* Get conversion exception callback property */ \
if (H5CX_get_dt_conv_cb(&cb_struct) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, \
"unable to get conversion exception callback") \
"unable to get conversion exception callback"); \
\
/* Get source and destination datatypes */ \
if (NULL == (st = (H5T_t *)H5I_object(src_id)) || \
NULL == (dt = (H5T_t *)H5I_object(dst_id))) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
"unable to dereference datatype object ID") \
"unable to dereference datatype object ID"); \
\
H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \
\
Expand Down

0 comments on commit 420ae22

Please sign in to comment.