summaryrefslogtreecommitdiff
path: root/documentation/0.doxygen/example/src/function.c
diff options
context:
space:
mode:
authorChen Wang <[email protected]>2025-10-10 10:05:06 +0800
committerGitHub <[email protected]>2025-10-10 10:05:06 +0800
commit273185b45aa6f9ec445b47faba688b6b7dbd3f66 (patch)
tree7c0edcbcdd27e15edfb3b83482c5b148cef3c2aa /documentation/0.doxygen/example/src/function.c
parent1aef0dba719d9080690ca370605fdee947296dec (diff)
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 <[email protected]> * 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 <[email protected]>
Diffstat (limited to 'documentation/0.doxygen/example/src/function.c')
-rw-r--r--documentation/0.doxygen/example/src/function.c12
1 files changed, 6 insertions, 6 deletions
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)