From 862e0b0f55a177e680cc2c8d92a98957fbe9c27e Mon Sep 17 00:00:00 2001
From: Sam Russell <sam.h.russell@gmail.com>
Date: Thu, 31 Oct 2024 14:59:37 +0100
Subject: [PATCH] crc: Fix compile warnings

* lib/crc-generate-table.c: Mark non-exported functions as static
* lib/crc.c: Mark non-exported functions as static
---
 ChangeLog                | 6 ++++++
 lib/crc-generate-table.c | 8 ++++----
 lib/crc.c                | 2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c5fdc6e2a..62c9f9b88f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-31 Sam Russell  <sam.h.russell@gmail.com>
+
+	crc: Fix compile warnings
+	* lib/crc-generate-table.c: Mark non-exported functions as static
+	* lib/crc.c: Mark non-exported functions as static
+
 2024-10-31  Bruno Haible  <bruno@clisp.org>
 
 	crc: Don't attempt to run a compiled C program when cross-compiling.
diff --git a/lib/crc-generate-table.c b/lib/crc-generate-table.c
index 83a99baca0..d031aaf0ea 100644
--- a/lib/crc-generate-table.c
+++ b/lib/crc-generate-table.c
@@ -40,7 +40,7 @@
  */
 unsigned long crc_table[256];
 
-void
+static void
 make_crc_table (int bits)
 {
   unsigned long c;
@@ -60,7 +60,7 @@ make_crc_table (int bits)
     }
 }
 
-void
+static void
 print_crc_table (FILE * stream, int bits)
 {
   make_crc_table (bits);
@@ -80,7 +80,7 @@ print_crc_table (FILE * stream, int bits)
   fprintf (stream, "  }");
 }
 
-void
+static void
 print_header (FILE * stream)
 {
   fprintf (stream, "/* Slice-by-8 lookup tables */\n");
@@ -95,7 +95,7 @@ print_header (FILE * stream)
   fprintf (stream, "};\n");
 }
 
-void
+static void
 print_copyright_notice (FILE * stream)
 {
   fprintf (stream, "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\n");
diff --git a/lib/crc.c b/lib/crc.c
index 42686106ab..53f26486a2 100644
--- a/lib/crc.c
+++ b/lib/crc.c
@@ -81,7 +81,7 @@ crc32_update_no_xor_slice_by_8 (uint32_t crc, const char *buf)
   return crc;
 }
 
-uint32_t
+static uint32_t
 crc32_update_no_xor_slice_by_n (uint32_t crc, const char *buf,
                                 size_t num_bytes)
 {
-- 
2.34.1

