From patchwork Thu Feb 12 19:53:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kimplul X-Patchwork-Id: 130052 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 1FBAC4BA2E3D for ; Thu, 12 Feb 2026 20:01:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FBAC4BA2E3D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=SK+pTid1 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 0B1BD4BA2E12 for ; Thu, 12 Feb 2026 20:00:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B1BD4BA2E12 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0B1BD4BA2E12 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770926452; cv=none; b=pLpcRimhLeVqAqCkmbw9F5wcl7/gGufK0fBOLFDzrEs/EiwstGk2HGvUO0D/V8PL01pd0nMV3HC/MdWcpAMsCBn26uPC3zLd4Cw6ohYURMSjpQm7oXYwxBGNtfV6O9Dp++FDh2MNKWgO3CLxfdcvdYkFBGaKP5PnZ2ctp63brxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770926452; c=relaxed/simple; bh=8kcuw2ZpGwrkP6vFYNbX0JzGo0jdRMh15SfWGbcG4/M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=m0TlWujOcSmrUFi9auSNEuGRvRa9XO7VuXq/TCqwQxh8jQYgAuO/UxLOndOF1+xhK6IPXgmJKbwejC0CiLWgH3VG8Dc1qmSSx/9iLLOo2zgjZXrKkjRh8d8Kakx3fSRlGk29NxaMpVWayhLrp5pDkZl+dM50xHZfyg/mnZINwA0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B1BD4BA2E12 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-59dd4bec4ecso225109e87.0 for ; Thu, 12 Feb 2026 12:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770926451; x=1771531251; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OHfxVXD+oNm2/k+YYenKiqQ6Rp3XPXj03Sk4JnLWkn0=; b=SK+pTid1xFqql8g6XK8YOII8fzzfO0vYzuGrKIQirIPBkutUJH1/HE2jK4F9cw4aBS oucpTWXklow4UiMTC/iiJJU3wK+j1gyjnfM8MP1U4zw/Emptt8XXUMegzaMhBUEApTLb +DFfUA7fi9k17umBVeIaMvpQ4bVN8fBT5IRgqlr/kdYxoVst2UvEou3enGBz4A2ucGxt dCDIGslcOsPX2ZXgREMzJVAC4qGpCDHbhXr5ORRptwiOZvhXZzrPeKGik2RYSAUUDgEB zRd3lpRXTct3WD3Be5bSLTPAX2NRD253tg9g6dNv+bQ3/uLF21V+P6wowXrbWkNOs1is JXkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770926451; x=1771531251; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OHf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vGpVXEkY5+BluoHy4o/JPBkXRhFNFchaStuLQ6ozQjL2zaU0fg92a +WgtsQNO0o70QAdUdJmaMG79jdeeT8FQBA== X-Received: by 2002:a05:6512:3d90:b0:59d:f274:c4a with SMTP id 2adb3069b0e04-59eec18d584mr78626e87.8.1770926450467; Thu, 12 Feb 2026 12:00:50 -0800 (PST) Received: from KimiPC (dsl-trebng22-54f93e-132.dhcp.inet.fi. [84.249.62.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59e5f5a50acsm1141854e87.59.2026.02.12.12.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 12:00:49 -0800 (PST) From: Kimplul To: newlib@sourceware.org Cc: Kim Kuparinen Subject: [PATCH] Silence -Wold-style-definition warnings Date: Thu, 12 Feb 2026 21:53:13 +0200 Message-ID: <20260212200048.50218-1-kimi.h.kuparinen@gmail.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org From: Kim Kuparinen Hi, I noticed that there were a few warnings about old-style function definitions. I saw some other patches fixing the same warning, so this just continues on from them. Now everything compiles neatly on my machine at least :) Signed-off-by: Kim Kuparinen --- newlib/libc/reent/closer.c | 4 +--- newlib/libc/reent/fstatr.c | 5 +---- newlib/libc/reent/isattyr.c | 4 +--- newlib/libc/stdlib/envlock.c | 6 ++---- newlib/libc/stdlib/eprintf.c | 6 +----- newlib/libc/stdlib/getsubopt.c | 4 +--- newlib/libc/stdlib/mlock.c | 6 ++---- newlib/libm/math/w_drem.c | 3 +-- 8 files changed, 10 insertions(+), 28 deletions(-) diff --git a/newlib/libc/reent/closer.c b/newlib/libc/reent/closer.c index 2d72b2ab5..eabe64f01 100644 --- a/newlib/libc/reent/closer.c +++ b/newlib/libc/reent/closer.c @@ -37,9 +37,7 @@ DESCRIPTION */ int -_close_r (ptr, fd) - struct _reent *ptr; - int fd; +_close_r (struct _reent *ptr, int fd) { int ret; diff --git a/newlib/libc/reent/fstatr.c b/newlib/libc/reent/fstatr.c index 9a02e9a68..1521c3336 100644 --- a/newlib/libc/reent/fstatr.c +++ b/newlib/libc/reent/fstatr.c @@ -44,10 +44,7 @@ DESCRIPTION */ int -_fstat_r (ptr, fd, pstat) - struct _reent *ptr; - int fd; - struct stat *pstat; +_fstat_r (struct _reent *ptr, int fd, struct stat *pstat) { int ret; diff --git a/newlib/libc/reent/isattyr.c b/newlib/libc/reent/isattyr.c index f76945519..bbc7f4c9b 100644 --- a/newlib/libc/reent/isattyr.c +++ b/newlib/libc/reent/isattyr.c @@ -42,9 +42,7 @@ DESCRIPTION */ int -_isatty_r (ptr, fd) - struct _reent *ptr; - int fd; +_isatty_r (struct _reent *ptr, int fd) { int ret; diff --git a/newlib/libc/stdlib/envlock.c b/newlib/libc/stdlib/envlock.c index 3afe30ee9..bd843afc2 100644 --- a/newlib/libc/stdlib/envlock.c +++ b/newlib/libc/stdlib/envlock.c @@ -36,8 +36,7 @@ __LOCK_INIT_RECURSIVE(static, __env_recursive_mutex); #endif void -__env_lock (ptr) - struct _reent *ptr; +__env_lock (struct _reent *ptr) { #ifndef __SINGLE_THREAD__ __lock_acquire_recursive (__env_recursive_mutex); @@ -45,8 +44,7 @@ __env_lock (ptr) } void -__env_unlock (ptr) - struct _reent *ptr; +__env_unlock (struct _reent *ptr) { #ifndef __SINGLE_THREAD__ __lock_release_recursive (__env_recursive_mutex); diff --git a/newlib/libc/stdlib/eprintf.c b/newlib/libc/stdlib/eprintf.c index 46cf8104b..9e4f5fd5a 100644 --- a/newlib/libc/stdlib/eprintf.c +++ b/newlib/libc/stdlib/eprintf.c @@ -14,11 +14,7 @@ #include void -__eprintf (format, file, line, expression) - const char *format; - const char *file; - unsigned int line; - const char *expression; +__eprintf (const char *format, const char *file, unsigned int line, const char *expression) { (void) fiprintf (stderr, format, file, line, expression); abort (); diff --git a/newlib/libc/stdlib/getsubopt.c b/newlib/libc/stdlib/getsubopt.c index 298624d35..4f3bb833f 100644 --- a/newlib/libc/stdlib/getsubopt.c +++ b/newlib/libc/stdlib/getsubopt.c @@ -45,9 +45,7 @@ static char sccsid[] = "@(#)getsubopt.c 8.1 (Berkeley) 6/4/93"; char *suboptarg; int -getsubopt(optionp, tokens, valuep) - char **optionp, **valuep; - char * const *tokens; +getsubopt(char **optionp, char * const *tokens, char **valuep) { int cnt; char *p; diff --git a/newlib/libc/stdlib/mlock.c b/newlib/libc/stdlib/mlock.c index 23aa10173..e5ac13195 100644 --- a/newlib/libc/stdlib/mlock.c +++ b/newlib/libc/stdlib/mlock.c @@ -37,8 +37,7 @@ __LOCK_INIT_RECURSIVE(static, __malloc_recursive_mutex); #endif void -__malloc_lock (ptr) - struct _reent *ptr; +__malloc_lock (struct _reent *ptr) { #ifndef __SINGLE_THREAD__ __lock_acquire_recursive (__malloc_recursive_mutex); @@ -46,8 +45,7 @@ __malloc_lock (ptr) } void -__malloc_unlock (ptr) - struct _reent *ptr; +__malloc_unlock (struct _reent *ptr) { #ifndef __SINGLE_THREAD__ __lock_release_recursive (__malloc_recursive_mutex); diff --git a/newlib/libm/math/w_drem.c b/newlib/libm/math/w_drem.c index d289bdaac..4472fa83f 100644 --- a/newlib/libm/math/w_drem.c +++ b/newlib/libm/math/w_drem.c @@ -8,8 +8,7 @@ #include "fdlibm.h" double -drem(x, y) - double x, y; +drem(double x, double y) { return remainder(x, y); }