maint: pacify GCC 14 -Wmissing-variable-declarations

* src/local.mk: Include extern decl for 'Version'.
* src/crctab.c (crctab): Add an extern decl.
* src/cksum.c: Generate an extern decl.
This commit is contained in:
Collin Funk 2024-05-01 14:15:56 +01:00 committed by Pádraig Brady
parent c06d767ada
commit ba8a43c24d
3 changed files with 4 additions and 1 deletions

View File

@ -118,7 +118,8 @@ main (void)
printf ("#include <config.h>\n");
printf ("#include <stdint.h>\n");
printf ("\nuint_fast32_t const crctab[8][256] = {\n");
printf ("\nextern uint_fast32_t const crctab[8][256];\n");
printf ("uint_fast32_t const crctab[8][256] = {\n");
for (int y = 0; y < 8; y++)
{
printf ("{\n 0x%08x", crctab[y][0]);

View File

@ -1,6 +1,7 @@
#include <config.h>
#include <stdint.h>
extern uint_fast32_t const crctab[8][256];
uint_fast32_t const crctab[8][256] = {
{
0x00000000,

View File

@ -633,6 +633,7 @@ src/version.c: Makefile
$(AM_V_GEN)rm -f $@
$(AM_V_at)${MKDIR_P} src
$(AM_V_at)printf '#include <config.h>\n' > $@t
$(AM_V_at)printf '#include "version.h"\n' >> $@t
$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
$(AM_V_at)chmod a-w $@t
$(AM_V_at)mv $@t $@