提交 f42be8a2 编写于 作者: A Andrea Bolognani

docs: Use definition list instead of table in coding style

This format is much easier to tweak and update.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 842d3712
...@@ -547,27 +547,32 @@ Attribute annotations ...@@ -547,27 +547,32 @@ Attribute annotations
Use the following annotations to help the compiler and/or static Use the following annotations to help the compiler and/or static
analysis tools understand the code better: analysis tools understand the code better:
+-------------------------------+------------------------------------------------------------+ ``ATTRIBUTE_NONNULL``
| Macro | Meaning | passing NULL for this parameter is not allowed
+===============================+============================================================+
| ``ATTRIBUTE_NONNULL`` | passing NULL for this parameter is not allowed | ``ATTRIBUTE_PACKED``
+-------------------------------+------------------------------------------------------------+ force a structure to be packed
| ``ATTRIBUTE_PACKED`` | force a structure to be packed |
+-------------------------------+------------------------------------------------------------+ ``G_GNUC_FALLTHROUGH``
| ``G_GNUC_FALLTHROUGH`` | allow code reuse by multiple switch cases | allow code reuse by multiple switch cases
+-------------------------------+------------------------------------------------------------+
| ``G_GNUC_NO_INLINE`` | the function is mocked in the test suite | ``G_GNUC_NO_INLINE``
+-------------------------------+------------------------------------------------------------+ the function is mocked in the test suite
| ``G_GNUC_NORETURN`` | the function never returns |
+-------------------------------+------------------------------------------------------------+ ``G_GNUC_NORETURN``
| ``G_GNUC_NULL_TERMINATED`` | last parameter must be NULL | the function never returns
+-------------------------------+------------------------------------------------------------+
| ``G_GNUC_PRINTF`` | validate that the formatting string matches parameters | ``G_GNUC_NULL_TERMINATED``
+-------------------------------+------------------------------------------------------------+ last parameter must be NULL
| ``G_GNUC_UNUSED`` | parameter is unused in this implementation of the function |
+-------------------------------+------------------------------------------------------------+ ``G_GNUC_PRINTF``
| ``G_GNUC_WARN_UNUSED_RESULT`` | the return value must be checked | validate that the formatting string matches parameters
+-------------------------------+------------------------------------------------------------+
``G_GNUC_UNUSED``
parameter is unused in this implementation of the function
``G_GNUC_WARN_UNUSED_RESULT``
the return value must be checked
File handling File handling
------------- -------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册