Skip to content

Commit

Permalink
Fix build with gcc12.
Browse files Browse the repository at this point in the history
  • Loading branch information
delphij committed Jun 14, 2023
1 parent 246aec9 commit 6cc4a1c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/libutil/tests/expand_number_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@ ATF_TC_BODY(positivetests, tc)
ATF_TC_WITHOUT_HEAD(negativetests);
ATF_TC_BODY(negativetests, tc)
{
int retval;
uint64_t num;

ATF_CHECK_ERRNO(EINVAL, retval = expand_number("", &num));
ATF_CHECK_ERRNO(EINVAL, retval = expand_number("x", &num));
ATF_CHECK_ERRNO(EINVAL, retval = expand_number("1bb", &num));
ATF_CHECK_ERRNO(EINVAL, retval = expand_number("1x", &num));
ATF_CHECK_ERRNO(EINVAL, retval = expand_number("1kx", &num));
ATF_CHECK_ERRNO(ERANGE, retval = expand_number("16E", &num));
ATF_CHECK_ERRNO(EINVAL, expand_number("", &num));
ATF_CHECK_ERRNO(EINVAL, expand_number("x", &num));
ATF_CHECK_ERRNO(EINVAL, expand_number("1bb", &num));
ATF_CHECK_ERRNO(EINVAL, expand_number("1x", &num));
ATF_CHECK_ERRNO(EINVAL, expand_number("1kx", &num));
ATF_CHECK_ERRNO(ERANGE, expand_number("16E", &num));
}

ATF_TP_ADD_TCS(tp)
Expand Down

0 comments on commit 6cc4a1c

Please sign in to comment.