]> Savannah Git Hosting - gnulib.git/commitdiff
crc: Fix compile warnings
authorSam Russell <sam.h.russell@gmail.com>
Thu, 31 Oct 2024 13:59:37 +0000 (14:59 +0100)
committerSimon Josefsson <simon@josefsson.org>
Thu, 31 Oct 2024 15:44:21 +0000 (16:44 +0100)
* lib/crc-generate-table.c: Mark non-exported functions as static
* lib/crc.c: Mark non-exported functions as static

Signed-off-by: Simon Josefsson <simon@josefsson.org>
ChangeLog
lib/crc-generate-table.c
lib/crc.c

index 5c5fdc6e2adfe9cbde79d025011d960984c41565..62c9f9b88fbf8794a67152f2a928f42bf5c670ec 100644 (file)
--- 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.
index 83a99baca09d339d25c1702265da66edd70909b9..d031aaf0ead3c1f09a89cf9d54bd7a39f2edef66 100644 (file)
@@ -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");
index 42686106ab587f3d38e145a756e3b97301067c86..53f26486a221be2360d74da4bbef232e9e042887 100644 (file)
--- 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)
 {