binutils-gdb/libctf
Nick Alcock 7e1368b58f libctf: don't pass errno into ctf_err_warn so often
The libctf-internal warning function ctf_err_warn() can be passed a libctf
errno as a parameter, and will add its textual errmsg form to the passed-in
error message. But if there is an error on the fp already, and this is
specifically an error and not a warning, ctf_err_warn() will print the error
out regardless: there's no need to pass in anything but 0.

There are still a lot of places where we do

ctf_err_warn (fp, 0, EFOO, ...);
return ctf_set_errno (fp, 0, EFOO);

I've left all of those alone, because fixing it makes the code a bit longer:
but fixing the cases where no return is involved and the error has just been
set on the fp itself costs nothing and reduces redundancy a bit.

libctf/

	* ctf-dedup.c (ctf_dedup_walk_output_mapping): Drop the errno arg.
	(ctf_dedup_emit): Likewise.
	(ctf_dedup_type_mapping): Likewise.
	* ctf-link.c (ctf_create_per_cu): Likewise.
	(ctf_link_deduplicating_close_inputs): Likewise.
	(ctf_link_deduplicating_one_symtypetab): Likewise.
	(ctf_link_deduplicating_per_cu): Likewise.
	* ctf-lookup.c (ctf_lookup_symbol_idx): Likewise.
	* ctf-subr.c (ctf_assert_fail_internal): Likewise.
2024-04-19 16:14:48 +01:00
..
doc Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
testsuite libctf: fix leak in test 2024-04-19 16:14:47 +01:00
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 mmap: Avoid the sanitizer configure check failure 2024-04-10 03:57:46 -07:00
ChangeLog Add markers for 2.42 branch 2024-01-15 14:42:15 +00:00
ChangeLog-2020 libctf: fix old ChangeLog typo 2021-01-05 14:53:40 +00:00
config.h.in Finalized intl-update patches 2023-11-15 12:53:04 +00:00
configure mmap: Avoid the sanitizer configure check failure 2024-04-10 03:57:46 -07:00
configure.ac mmap: Avoid the sanitizer configure check failure 2024-04-10 03:57:46 -07:00
ctf-archive.c libctf: make ctf_serialize() actually serialize 2024-04-19 16:14:47 +01:00
ctf-create.c libctf: make ctf_serialize() actually serialize 2024-04-19 16:14:47 +01:00
ctf-decl.c Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-decls.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-dedup.c libctf: don't pass errno into ctf_err_warn so often 2024-04-19 16:14:48 +01:00
ctf-dump.c libctf: improve handling of type dumping errors 2024-04-19 16:14:47 +01:00
ctf-endian.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-error.c Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-hash.c Revert "libctf: do not corrupt strings across ctf_serialize" 2024-04-19 16:14:46 +01:00
ctf-impl.h libctf: make ctf_serialize() actually serialize 2024-04-19 16:14:47 +01:00
ctf-inlines.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-intl.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-labels.c Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-link.c libctf: don't pass errno into ctf_err_warn so often 2024-04-19 16:14:48 +01:00
ctf-lookup.c libctf: don't pass errno into ctf_err_warn so often 2024-04-19 16:14:48 +01:00
ctf-open-bfd.c Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-open.c libctf: make ctf_serialize() actually serialize 2024-04-19 16:14:47 +01:00
ctf-qsort_r.c Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-serialize.c libctf: make ctf_serialize() actually serialize 2024-04-19 16:14:47 +01:00
ctf-sha1.c Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-sha1.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf-string.c libctf: make ctf_serialize() actually serialize 2024-04-19 16:14:47 +01:00
ctf-subr.c libctf: don't pass errno into ctf_err_warn so often 2024-04-19 16:14:48 +01:00
ctf-types.c libctf: support addition of types to dicts read via ctf_open() 2024-04-19 16:14:46 +01:00
ctf-util.c libctf: replace 'pending refs' abstraction 2024-04-19 16:14:46 +01:00
elf.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
libctf.ver Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
Makefile.am Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
Makefile.in mmap: Avoid the sanitizer configure check failure 2024-04-10 03:57:46 -07:00
NEWS include, libctf, ld: extend variable section to contain functions too 2022-03-23 13:48:32 +00:00
swap.h libctf warnings 2024-04-17 09:24:36 +09:30