Source: nn Version: 6.7.3-14 Severity: normal Tags: patch Dear Maintainer,
>From 027ac74467e9fedb91ad68eac9a14b145a921677 Mon Sep 17 00:00:00 2001 >From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> >Date: Wed, 3 Mar 2021 21:57:21 +0000 >Subject: [PATCH] global.h:. Fix warning from the compiler cc -Iconf -Wall -Wextra -Wformat=2 -Wstringop-overflow=4 -Wshadow=global -Wredundant-decls -Wunused -Wunused-parameter -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -fstack-protector-strong -fno-common -fstack-clash-protection -ftrapv -funsigned-char -fvar-tracking-assignments -ggdb -D_FORTIFY_SOURCE=2 -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -Wold-style-declaration -std=c2x -c -o nn.o nn.c In file included from nn.c:18: global.h:30:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] 30 | typedef int (*fct_type) (); | ^~~~~~~ #### Create more specific prototypes: (*fct_type_void) (void); (*fct_type_int) (int); (*fct_type_char_int) (char *, int); Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> --- global.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/global.h b/global.h index 0d9d475..9f75975 100644 --- a/global.h +++ b/global.h @@ -27,9 +27,17 @@ typedef long article_number; typedef int32 group_number; typedef uint32 time_stamp; -typedef int (*fct_type) (); +/* Special "*fct_type" are needed */ +/* typedef int (*fct_type) (); */ +typedef int (*fct_type_void) (void); +typedef int (*fct_type_int) (int); +typedef int (*fct_type_char_int) (char *, int); + #define CALL(fct) (* (fct)) -#define NULL_FCT (fct_type)NULL +/* #define NULL_FCT (fct_type)NULL */ +#define NULL_FCT (fct_type_char_int)NULL +#define NULL_FCT_INT (fct_type_int)NULL + /* frequently used characters */ -- 2.30.1 -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.9-1 (SMP w/2 CPU threads) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) -- debconf information excluded -- Bjarni I. Gislason