[PATCH] Move is_negated_errno() to new header negated_errno.h

Dmitry V. Levin ldv at altlinux.org
Sat Jul 15 02:32:46 UTC 2017


On Fri, Jul 14, 2017 at 11:31:03AM +0200, Miodrag Dinic wrote:
> From: Lazar Trsic <Lazar.Trsic at imgtec.com>
> 
> Move is_negated_errno() to a separate new header file negated_errno.h
> and include it just for architectures which require it.
> 
> is_negated_errno() is not used on those architectures
> that have a dedicated register to signal a syscall error.
> 
> The issue was raised when compiling with clang, which is more
> strict regarding semantics of unused static inline functions
> defined in C files and will issue a -Wunused-function warrning
> if they are not used anywhere.
> ---
>  linux/aarch64/get_error.c    |  2 ++
>  linux/arc/get_error.c        |  2 ++
>  linux/arm/get_error.c        |  2 ++
>  linux/avr32/get_error.c      |  2 ++
>  linux/bfin/get_error.c       |  2 ++
>  linux/crisv10/get_error.c    |  2 ++
>  linux/hppa/get_error.c       |  2 ++
>  linux/i386/get_error.c       |  2 ++
>  linux/ia64/get_error.c       |  2 ++
>  linux/m68k/get_error.c       |  2 ++
>  linux/metag/get_error.c      |  2 ++
>  linux/microblaze/get_error.c |  2 ++
>  linux/or1k/get_error.c       |  2 ++
>  linux/riscv/get_error.c      |  2 ++
>  linux/s390/get_error.c       |  2 ++
>  linux/sh/get_error.c         |  2 ++
>  linux/sh64/get_error.c       |  2 ++
>  linux/tile/get_error.c       |  2 ++
>  linux/x86_64/get_error.c     |  2 ++
>  linux/xtensa/get_error.c     |  2 ++
>  negated_errno.h              | 51 ++++++++++++++++++++++++++++++++++++++++++++
>  syscall.c                    | 20 -----------------
>  22 files changed, 91 insertions(+), 20 deletions(-)
>  create mode 100644 negated_errno.h

The new header had to be added to Makefile.am, otherwise it won't be
included in release tarballs.
 
Applied with this and other minor corrections.  Thanks,


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170715/bac1775a/attachment.bin>


More information about the Strace-devel mailing list