From f819093b7da4f9eb20b3f035a009e911912e1aca Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Sat, 29 Apr 2023 15:28:42 +0000 Subject: [PATCH] Don't spew unknown expression warnings if @suppress-warnings is set. --- src/include/Routes.h | 2 ++ tools/src/hdoc.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/include/Routes.h b/src/include/Routes.h index 9fdcd7f..14f4603 100644 --- a/src/include/Routes.h +++ b/src/include/Routes.h @@ -36,6 +36,8 @@ * specification for documentation on Matrix routes and the * .Xr telodendria-admin * page for admin API routes. + * + * @suppress-warnings */ #include diff --git a/tools/src/hdoc.c b/tools/src/hdoc.c index 8a671fe..a02ec70 100644 --- a/tools/src/hdoc.c +++ b/tools/src/hdoc.c @@ -316,6 +316,10 @@ main(int argc, char **argv) } break; case HP_UNKNOWN: + if (HashMapGet(registers, "suppress-warnings")) + { + break; + } StreamPrintf(StreamStderr(), "Warning: Unknown expression: %s\n", expr.data.text); break;