From 273185b45aa6f9ec445b47faba688b6b7dbd3f66 Mon Sep 17 00:00:00 2001 From: Chen Wang Date: Fri, 10 Oct 2025 10:05:06 +0800 Subject: doxygen: fix two issues when building with doxygen 1.9.8 (#10768) * doxygen: remove @return command if function return void When doxygen is upgraded to v1.9.8 (on ubuntu 24.04), doxygen reports: "doxygen error: found documented return type for xxx that does not return anything" for those functions which return void but declare "@return" in doxygen comment. Solution: remove "@return" for those cases, and update guide document for how to write doxgen comment for functions. Signed-off-by: Chen Wang * doxygen: fixed a minor typo for uart doc This error is found when building with doxygen 1.9.8, but not detecetd on 1.9.1. Signed-off-by: Chen Wang --- documentation/0.doxygen/example/src/function.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'documentation/0.doxygen/example/src/function.c') diff --git a/documentation/0.doxygen/example/src/function.c b/documentation/0.doxygen/example/src/function.c index 98b2007dea..96b30f7090 100644 --- a/documentation/0.doxygen/example/src/function.c +++ b/documentation/0.doxygen/example/src/function.c @@ -33,10 +33,12 @@ * * To documenting for functions, a comment block before the function * declaraion/definition is recommended to describe the general information - * of the function. In the comment block, a `@brief` is required, a `@return` - * is also required no matter if the function return values or not. `@param` is - * required if any, and if it is provided, direction [in]/[out]/[in,out] should - * be provide together. Other commands (such as `@note`) are optional. + * of the function. In the comment block, a `@brief` is required. A `@return` + * is also required if the function is intended to return a value, otherwise + * if the function is implemented with a void return type, `@return` is not + * required. `@param` is required if any, and if it is provided, + * direction [in]/[out]/[in,out] should be provide together. Other commands + * (such as `@note`) are optional. * * If you feel that the description of `@brief` is not enough, you * can add a detailed description part, which is also optional. @@ -72,8 +74,6 @@ * * @param[in] b Description of param b * - * @return void - * * @note This is a note for this structure, blah blah blah... */ void doxygen_example_func_foo(int a, int b) -- cgit v1.3.1