Date: Mon, 27 Feb 2023 21:36:26 +0100 From: Paul Floyd <paulf2718@gmail.com> To: freebsd-current@freebsd.org Subject: Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C Message-ID: <5362f30e-a836-df3c-e119-9af2f5499643@gmail.com> In-Reply-To: <20230227192011.08f7aa8e@thor.intern.walstatt.dynvpn.de> References: <20230227192011.08f7aa8e@thor.intern.walstatt.dynvpn.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 27-02-23 19:19, FreeBSD User wrote: > Running recent CURRENT as host (FreeBSD 14.0-CURRENT #23 main-n261147-b8bb73ab724b: Sun Feb 26 > 17:39:38 CET 2023 amd64), and nanoBSD (recent 13-STABLE, git stable/13). > > Building an appliance based on 13-STABLE sources, a customized kernel via nanoBSD, since a > couple of weeks for now building the sources fails in kernel sources: > > [...] > --- modules-all --- > --- all_subdir_an --- > /pool/home/ohartmann/Projects/router/router/apu2c4/src/sys/dev/an/if_an_pci.c:143:1: error: a > function definition without a prototype is deprecated in all versions of C and is not > supported in C2x [-Werror,-Wdeprecated-non-prototype] > [..] You need to either fix the C code or find someone else that can fix it.* This is code that ensures that function calls correctly match function definitions using the high tech method of "cross your fingers and hope that it works". This was "fixed" by ANSI C going on for 35 years ago. Ancient code like this is probably safe enough - the finger crossing seems to have worked for a long time. It's no wonder people are clamouring to only use safe languages like Rust for new projects. A+ Paul * well maybe there is a compiler switch like -Wno-sane-person-would-do-this
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5362f30e-a836-df3c-e119-9af2f5499643>