[PATCH] lib: Fix unused parameter warning in lib/error.c

2021-09-08 Thread Colin Cross via Elfutils-devel
Mark the errnum parameter with __attribute__((unused)). Signed-off-by: Colin Cross --- lib/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/error.c b/lib/error.c index 75e964fd..651a0f3d 100644 --- a/lib/error.c +++ b/lib/error.c @@ -35,7 +35,7 @@ unsigned int e

[PATCH] lib: Make error.c more like error(3)

2021-09-10 Thread Colin Cross via Elfutils-devel
Fix some issues with the error reimplementation to make it match the specification for error(3). Flush stdout before printing to stderr. Also flush stderr afterwards, which is not specified in the man page for error(3), but is what bionic does. error(3) prints strerror(errnum) if and only if err