Hi,

While working on an inetutils patch I wrote something like:

   #include "inttostr.h"

   char *str = inttostr (...);

Afterwards, running 'make syntax-check' mistakenly yelled at me:

    maint.mk: the above files include inttostr.h but don't use it
    make: *** [maint.mk:694: sc_prohibit_inttostr_without_use] Error 1

That is because the regex didn't match "inttostr". I pushed the
attached patch to fix it.

Collin

>From 03cc9b5ab1a7030f413c6459c56e13a7da0a2979 Mon Sep 17 00:00:00 2001
Message-ID: <03cc9b5ab1a7030f413c6459c56e13a7da0a2979.1783877571.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sun, 12 Jul 2026 10:32:11 -0700
Subject: [PATCH] maintainer-makefile: Fix false syntax-check failure when
 using inttostr.

* top/maint.mk (sc_prohibit_inttostr_without_use): Adjust the regular
expression to also match inttostr.
---
 ChangeLog    | 6 ++++++
 top/maint.mk | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f6b1144f41..2aaa4d3992 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-07-12  Collin Funk  <[email protected]>
+
+	maintainer-makefile: Fix false syntax-check failure when using inttostr.
+	* top/maint.mk (sc_prohibit_inttostr_without_use): Adjust the regular
+	expression to also match inttostr.
+
 2026-07-08  Bruno Haible  <[email protected]>
 
 	free-posix: Fix bogus -Wmismatched-dealloc warnings (regr. 2026-05-30).
diff --git a/top/maint.mk b/top/maint.mk
index 7e4351e90d..2ba6b00f4e 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -691,7 +691,7 @@ sc_prohibit_long_options_without_use:
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_inttostr_without_use:
-	@h='inttostr.h' re='\<(off|[iu]max|uint)tostr *\(' \
+	@h='inttostr.h' re='\<(off|[iu]max|u?int)tostr *\(' \
 	  $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
-- 
2.55.0

Reply via email to