From f42be8a2ef048229231a4ab0e29d07e958be42b4 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Thu, 7 May 2020 14:38:35 +0200 Subject: [PATCH] docs: Use definition list instead of table in coding style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This format is much easier to tweak and update. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrangé --- docs/coding-style.rst | 47 ++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index 151ea87b6a..03b89c86e5 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -547,27 +547,32 @@ Attribute annotations Use the following annotations to help the compiler and/or static analysis tools understand the code better: -+-------------------------------+------------------------------------------------------------+ -| Macro | Meaning | -+===============================+============================================================+ -| ``ATTRIBUTE_NONNULL`` | passing NULL for this parameter is not allowed | -+-------------------------------+------------------------------------------------------------+ -| ``ATTRIBUTE_PACKED`` | force a structure to be packed | -+-------------------------------+------------------------------------------------------------+ -| ``G_GNUC_FALLTHROUGH`` | allow code reuse by multiple switch cases | -+-------------------------------+------------------------------------------------------------+ -| ``G_GNUC_NO_INLINE`` | the function is mocked in the test suite | -+-------------------------------+------------------------------------------------------------+ -| ``G_GNUC_NORETURN`` | the function never returns | -+-------------------------------+------------------------------------------------------------+ -| ``G_GNUC_NULL_TERMINATED`` | last parameter must be NULL | -+-------------------------------+------------------------------------------------------------+ -| ``G_GNUC_PRINTF`` | 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 | -+-------------------------------+------------------------------------------------------------+ +``ATTRIBUTE_NONNULL`` + passing NULL for this parameter is not allowed + +``ATTRIBUTE_PACKED`` + force a structure to be packed + +``G_GNUC_FALLTHROUGH`` + allow code reuse by multiple switch cases + +``G_GNUC_NO_INLINE`` + the function is mocked in the test suite + +``G_GNUC_NORETURN`` + the function never returns + +``G_GNUC_NULL_TERMINATED`` + last parameter must be NULL + +``G_GNUC_PRINTF`` + 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 ------------- -- GitLab