Enable -Wdocumentation
by taking advantage of our --enable-suppress-external-warnings
flag. Most of the CIs are using this flag now, so any regressions should be caught.
This also required modifying libevents flags when suppressing warnings, as depending on the version being built against, that could generate a large number of warnings. i.e:
0In file included from httpserver.cpp:34:
1In file included from ./support/events.h:12:
2/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:464:11: warning: parameter 'req' not found in the function declaration [-Wdocumentation] [@param](/bitcoin-bitcoin/contributor/param/) req a request object
3 ^~~
4/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:465:11: warning: parameter 'databuf' not found in the function declaration [-Wdocumentation] [@param](/bitcoin-bitcoin/contributor/param/) databuf the data chunk to send as part of the reply.
5 ^~~~~~~
6/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:467:11: warning: parameter 'call' not found in the function declaration [-Wdocumentation] [@param](/bitcoin-bitcoin/contributor/param/) call back's argument.
7 ^~~~
8/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:939:4: warning: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync] [@deprecated](/bitcoin-bitcoin/contributor/deprecated/) This function is deprecated; you probably want to use
9 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:946:1: note: add a deprecation attribute to the declaration to silence this warning
11char *evhttp_decode_uri(const char *uri);
12^
13__AVAILABILITY_INTERNAL_DEPRECATED
14/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:979:5: warning: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync] [@deprecated](/bitcoin-bitcoin/contributor/deprecated/) This function is deprecated as of Libevent 2.0.9. Use
15 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:987:1: note: add a deprecation attribute to the declaration to silence this warning
17int evhttp_parse_query(const char *uri, struct evkeyvalq *headers);
18^
19__AVAILABILITY_INTERNAL_DEPRECATED
20/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:1002:11: warning: parameter 'query_parse' not found in the function declaration [-Wdocumentation] [@param](/bitcoin-bitcoin/contributor/param/) query_parse the query portion of the URI
21 ^~~~~~~~~~~
22/usr/local/Cellar/libevent/2.1.12/include/event2/http.h:1002:11: note: did you mean 'uri'? [@param](/bitcoin-bitcoin/contributor/param/) query_parse the query portion of the URI
23 ^~~~~~~~~~~
24 uri
2569 warnings generated.
Note that a lot of these have already been fixed upstream.