[binutils-gdb] libctf, testsuite: adjust for real return type of ctf_member_count
Nick Alcock
nix@sourceware.org
Tue Jan 5 19:54:13 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0814dbfbfcc9d92ce6adb42412eb555a24c756d4
commit 0814dbfbfcc9d92ce6adb42412eb555a24c756d4
Author: Nick Alcock <nick.alcock@oracle.com>
Date: Tue Jan 5 19:34:56 2021 +0000
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 <nick.alcock@oracle.com>
* testsuite/libctf-lookup/struct-iteration.c (main):
ctf_member_count returns an int.
Diff:
---
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 <nick.alcock@oracle.com>
+
+ * testsuite/libctf-lookup/struct-iteration.c (main):
+ ctf_member_count returns an int.
+
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* 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);
More information about the Binutils-cvs
mailing list