From a47384021dfbafe21b90220f1214b529a8502da6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 27 Dec 2025 22:42:41 +0100 Subject: Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- luhncheck.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/luhncheck.c b/luhncheck.c index 51f04ab..65315e4 100644 --- a/luhncheck.c +++ b/luhncheck.c @@ -9,6 +9,9 @@ NUSAGE(2, "number ..."); +#if defined(__GNUC__) +__attribute__((__pure__)) +#endif static int check_luhn(const char *s) { @@ -27,6 +30,8 @@ check_luhn(const char *s) break; s++; + /* fall through */ + case 1: if ('0' <= *s && *s <= '9') sum += (unsigned)(*s - '0'); -- cgit v1.2.3-70-g09d2