[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix two new syntax-check failures
From: |
Jim Meyering |
Subject: |
fix two new syntax-check failures |
Date: |
Tue, 06 Jun 2023 22:40:11 -0700 |
These changes fix two syntax-check failures.
One was due to this tight-scope issue:
floor_log2
floor_log2
floor_log2
floor_log2
make[1]: *** [/diffutils/tight-scope.mk:42: _gl_tight_scope] Error 1
The other was due files with uses of functions in alloca.h all of
which were newer than maint.mk's old regexp.
>From 608a613abd577c52ccf22644f211e7bad78b5061 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@meta.com>
Date: Tue, 6 Jun 2023 21:49:24 -0700
Subject: [PATCH 1/2] maint: avoid new tight-scope syntax-check failure
* src/system.h (floor_log2): Declare with "SYSTEM_INLINE int"
on the same line as the function name, to accommodate the
tight-scope syntax-check rule.
* cfg.mk (_gl_TS_extern): Add SYSTEM_INLINE to the regexp.
---
cfg.mk | 2 +-
src/system.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 8c9bab5..3713860 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -74,4 +74,4 @@ exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
exclude_file_name_regexp--sc_prohibit_doubled_word = ^tests/y2038-vs-32bit$$
# Tell gnulib's tight_scope rule that we mark externs with XTERN
-export _gl_TS_extern = extern|XTERN|DIFF_INLINE
+export _gl_TS_extern = extern|XTERN|DIFF_INLINE|SYSTEM_INLINE
diff --git a/src/system.h b/src/system.h
index ce4758d..f82ae61 100644
--- a/src/system.h
+++ b/src/system.h
@@ -212,8 +212,7 @@ verify (LIN_MAX <= IDX_MAX);
#define STREQ(a, b) (strcmp (a, b) == 0)
/* Return the floor of the log base 2 of N. Return -1 if N is zero. */
-SYSTEM_INLINE int
-floor_log2 (idx_t n)
+SYSTEM_INLINE int floor_log2 (idx_t n)
{
verify (IDX_MAX <= ULLONG_MAX);
return ULLONG_WIDTH - 1 - count_leading_zeros_ll (n);
--
2.41.0
>From 0d2ea921b3b4ed125368ce886e121c179eae42a7 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@meta.com>
Date: Tue, 6 Jun 2023 21:49:46 -0700
Subject: [PATCH 2/2] build: update gnulib to latest (for maint.mk syntax-check
fix)
---
gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnulib b/gnulib
index 0e26367..1496e1f 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 0e2636700a641556256a37fca0e7d6f472f83bb4
+Subproject commit 1496e1fbe5bd7a9302d9168e9dc1864f1e435547
--
2.41.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fix two new syntax-check failures,
Jim Meyering <=