From 15f1b2f12e612ba77da981035f2f0aa95b477b1a Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 21 Aug 2022 12:28:47 -0700 Subject: [PATCH] cgraph: prototype 'aagerror', squashing a -Wmissing-prototypes warning Normally Flex prototypes the `yyerror` function for you. But we change the default prefix of this scanner from `yy` to `aag`. So this function ends up unprototyped and the compiler thinks this worthy of a warning. In a sense, this change is a bit of a hack to silence this. But there does not seem much value to prototyping this in a separate header because most of the calls to this function come from generated Flex code itself. --- lib/cgraph/scan.l | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cgraph/scan.l b/lib/cgraph/scan.l index db6b6be88..89520abc0 100644 --- a/lib/cgraph/scan.l +++ b/lib/cgraph/scan.l @@ -218,6 +218,7 @@ ID ({NAME}|{NUMBER}) . return aagtext[0]; %% +extern void aagerror(const char *str); void aagerror(const char *str) { char xbuf[BUFSIZ]; -- 2.40.0