From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 2A5CB3858D28 for ; Fri, 1 Apr 2022 16:23:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A5CB3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy01.your-server.de ([78.46.139.224]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1naK3h-0001p3-80 for newlib@sourceware.org; Fri, 01 Apr 2022 18:23:33 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1naK3h-0008wy-5U for newlib@sourceware.org; Fri, 01 Apr 2022 18:23:33 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id CFB36480024 for ; Fri, 1 Apr 2022 18:23:32 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 1i8RYZ_GoSlK for ; Fri, 1 Apr 2022 18:23:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 6D8B64800C9 for ; Fri, 1 Apr 2022 18:23:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dvJy_fN915VP for ; Fri, 1 Apr 2022 18:23:32 +0200 (CEST) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 4E60A480024 for ; Fri, 1 Apr 2022 18:23:32 +0200 (CEST) From: Sebastian Huber To: newlib@sourceware.org Subject: [PATCH v2] newlib: Remove superfluous CHECK_STD_INIT() macro Date: Fri, 1 Apr 2022 18:23:29 +0200 Message-Id: <20220401162329.70024-1-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.5/26499/Fri Apr 1 10:20:48 2022) X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2022 16:23:40 -0000 This macro is unused or expands to nothing. --- newlib/libc/machine/spu/c99ppe.h | 1 - newlib/libc/machine/spu/getchar.c | 2 -- newlib/libc/machine/spu/gets.c | 2 -- newlib/libc/machine/spu/perror.c | 2 -- newlib/libc/machine/spu/putchar.c | 2 -- newlib/libc/machine/spu/puts.c | 2 -- newlib/libc/machine/spu/vprintf.c | 2 -- newlib/libc/machine/spu/vscanf.c | 2 -- newlib/libc/stdio/local.h | 9 --------- 9 files changed, 24 deletions(-) diff --git a/newlib/libc/machine/spu/c99ppe.h b/newlib/libc/machine/spu/c= 99ppe.h index 12a2cb3fb..263cf7fe0 100644 --- a/newlib/libc/machine/spu/c99ppe.h +++ b/newlib/libc/machine/spu/c99ppe.h @@ -105,6 +105,5 @@ FILE *__sfp (struct _reent *); =20 #define CHECK_INIT(ptr) \ do { if ((ptr) && !(ptr)->__cleanup) __sinit (ptr); } while (0) -#define CHECK_STD_INIT(ptr) /* currently, do nothing */ #define CHECK_STR_INIT(ptr) /* currently, do nothing */ #endif /* __ASSEMBLER__ */ diff --git a/newlib/libc/machine/spu/getchar.c b/newlib/libc/machine/spu/= getchar.c index 68247eff1..b166bba67 100644 --- a/newlib/libc/machine/spu/getchar.c +++ b/newlib/libc/machine/spu/getchar.c @@ -43,8 +43,6 @@ getchar () { int ret; =20 - CHECK_STD_INIT(_REENT); - return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETCHAR, &ret); } #endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/machine/spu/gets.c b/newlib/libc/machine/spu/get= s.c index 2ac05db3b..1047c5fde 100644 --- a/newlib/libc/machine/spu/gets.c +++ b/newlib/libc/machine/spu/gets.c @@ -40,8 +40,6 @@ char * gets (buf) char *buf; { - CHECK_STD_INIT(_REENT); - /* The return value gets written over buf */ return (char*) __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETS, &buf); diff --git a/newlib/libc/machine/spu/perror.c b/newlib/libc/machine/spu/p= error.c index eae1419a1..ec073b2f3 100644 --- a/newlib/libc/machine/spu/perror.c +++ b/newlib/libc/machine/spu/perror.c @@ -19,8 +19,6 @@ perror (const char *s) { c99_perror_t arg; =20 - CHECK_STD_INIT(_REENT); - arg.str =3D s; arg.arg_errno =3D errno; __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &arg); diff --git a/newlib/libc/machine/spu/putchar.c b/newlib/libc/machine/spu/= putchar.c index 67eb59976..7da00e0d7 100644 --- a/newlib/libc/machine/spu/putchar.c +++ b/newlib/libc/machine/spu/putchar.c @@ -10,8 +10,6 @@ int putchar (c) int c; { - CHECK_STD_INIT(_REENT); - /* c gets overwritten before return */ =20 return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c); diff --git a/newlib/libc/machine/spu/puts.c b/newlib/libc/machine/spu/put= s.c index 27bd2bd52..2f0506793 100644 --- a/newlib/libc/machine/spu/puts.c +++ b/newlib/libc/machine/spu/puts.c @@ -7,8 +7,6 @@ int puts (char const * s) { - CHECK_STD_INIT(_REENT); - /* The return value gets written over s */ return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTS, &s); diff --git a/newlib/libc/machine/spu/vprintf.c b/newlib/libc/machine/spu/= vprintf.c index de98c0a33..d2ebc4eda 100644 --- a/newlib/libc/machine/spu/vprintf.c +++ b/newlib/libc/machine/spu/vprintf.c @@ -24,8 +24,6 @@ vprintf (const char *fmt, { c99_vprintf_t args; =20 - CHECK_STD_INIT(_REENT); - args.fmt =3D fmt; va_copy(args.ap,ap); =20 diff --git a/newlib/libc/machine/spu/vscanf.c b/newlib/libc/machine/spu/v= scanf.c index e2d324ed7..c246d57c3 100644 --- a/newlib/libc/machine/spu/vscanf.c +++ b/newlib/libc/machine/spu/vscanf.c @@ -56,8 +56,6 @@ vscanf (const char *fmt, { c99_vscanf_t args; =20 - CHECK_STD_INIT(_REENT); - args.fmt =3D (char*) fmt; va_copy(args.ap,ap); =20 diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index 50818db0e..30c534dcd 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -220,15 +220,6 @@ extern _READ_WRITE_RETURN_TYPE __swrite64 (struct _r= eent *, void *, while (0) #endif /* !_REENT_SMALL || _REENT_GLOBAL_STDIO_STREAMS */ =20 -#define CHECK_STD_INIT(ptr) \ - do \ - { \ - struct _reent *_check_init_ptr =3D (ptr); \ - if ((_check_init_ptr) && !(_check_init_ptr)->__cleanup) \ - __sinit (_check_init_ptr); \ - } \ - while (0) - /* Return true and set errno and stream error flag iff the given FILE cannot be written now. */ =20 --=20 2.34.1