Don't spew unknown expression warnings if @suppress-warnings is set.

This commit is contained in:
Jordan Bancino 2023-04-29 15:28:42 +00:00
parent 0b1b4a8b29
commit f819093b7d
2 changed files with 6 additions and 0 deletions

View file

@ -36,6 +36,8 @@
* specification for documentation on Matrix routes and the
* .Xr telodendria-admin
* page for admin API routes.
*
* @suppress-warnings
*/
#include <HashMap.h>

View file

@ -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;