From 6be0fe412240dd8db1264bd7e2cbabadbe24c769 Mon Sep 17 00:00:00 2001 From: Sam Russell 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 Signed-off-by: Simon Josefsson --- 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 + + 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 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.39.5