Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C

From: Paul Floyd <paulf2718_at_gmail.com>
Date: Mon, 27 Feb 2023 20:36:26 UTC

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