From e5af0fc869281a96bca00e7d77680800af163663 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 1 Sep 2021 17:13:09 +0200 Subject: [PATCH] doc/developer: add warning pointers These two warnings are easy to get confused by, note down some pointers on what they actually mean. Signed-off-by: David Lamparter --- doc/developer/workflow.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst index b6fde2b283..c703be62fc 100644 --- a/doc/developer/workflow.rst +++ b/doc/developer/workflow.rst @@ -1217,6 +1217,20 @@ it possible to use your apis in paths that involve ``const`` objects. If you encounter existing apis that *could* be ``const``, consider including changes in your own pull-request. +Help with specific warnings +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +FRR's configure script enables a whole batch of extra warnings, some of which +may not be obvious in how to fix. Here are some notes on specific warnings: + +* ``-Wstrict-prototypes``: you probably just forgot the ``void`` in a function + declaration with no parameters, i.e. ``static void foo() {...}`` rather than + ``static void foo(void) {...}``. + + Without the ``void``, in C, it's a function with *unspecified* parameters + (and varargs calling convention.) This is a notable difference to C++, where + the ``void`` is optional and an empty parameter list means no parameters. + .. _documentation: -- 2.39.5