From 0814dbfbfcc9d92ce6adb42412eb555a24c756d4 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Tue, 5 Jan 2021 19:34:56 +0000 Subject: [PATCH] libctf, testsuite: adjust for real return type of ctf_member_count This returns an int, not a long int or an ssize_t (as one test was inconsistently assuming). libctf/ChangeLog 2021-01-05 Nick Alcock * testsuite/libctf-lookup/struct-iteration.c (main): ctf_member_count returns an int. --- libctf/ChangeLog | 5 +++++ libctf/testsuite/libctf-lookup/struct-iteration.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 0f5e96a2c83..dfac7be1833 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,8 @@ +2021-01-05 Nick Alcock + + * testsuite/libctf-lookup/struct-iteration.c (main): + ctf_member_count returns an int. + 2021-01-05 Nick Alcock * Makefile.am (BASEDIR): New. diff --git a/libctf/testsuite/libctf-lookup/struct-iteration.c b/libctf/testsuite/libctf-lookup/struct-iteration.c index 03750604ecf..080edfadca4 100644 --- a/libctf/testsuite/libctf-lookup/struct-iteration.c +++ b/libctf/testsuite/libctf-lookup/struct-iteration.c @@ -26,7 +26,7 @@ main (int argc, char *argv[]) const char *name; ctf_id_t membtype; ssize_t offset; - ssize_t icount = 0; + int icount = 0; int err; if (argc != 2) @@ -69,8 +69,8 @@ main (int argc, char *argv[]) goto nerr; if (icount != ctf_member_count (fp, type)) - printf ("member counts differ: %li by direct iteration, " - "%li by ctf_member_count\n", icount, ctf_member_count (fp, type)); + printf ("member counts differ: %i by direct iteration, " + "%i by ctf_member_count\n", icount, ctf_member_count (fp, type)); ctf_dict_close (fp); ctf_close (ctf); -- 2.30.2