diff mbox series

docs/misra: specify behaviour of checker for Directive 4.10

Message ID 5939b15ad764674b7d8cece654f891e880086d54.1731490924.git.alessandro.zucchelli@bugseng.com (mailing list archive)
State New
Headers show
Series docs/misra: specify behaviour of checker for Directive 4.10 | expand

Commit Message

Alessandro Zucchelli Nov. 13, 2024, 9:43 a.m. UTC
MISRA C:2012 Directive 4.10 states as following: Precautions shall be
taken in order to prevent the contents of a header file being included
more than once.

This commit updates the documentation to describe the behavior defined
for the checker.

No functional change.

Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
---
 docs/misra/rules.rst | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefano Stabellini Nov. 14, 2024, 2:09 a.m. UTC | #1
On Wed, 12 Nov 2024, Alessandro Zucchelli wrote:
> MISRA C:2012 Directive 4.10 states as following: Precautions shall be
> taken in order to prevent the contents of a header file being included
> more than once.
> 
> This commit updates the documentation to describe the behavior defined
> for the checker.
> 
> No functional change.
> 
> Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
> ---
>  docs/misra/rules.rst | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
> index 80e5e972ad..f5858b00bb 100644
> --- a/docs/misra/rules.rst
> +++ b/docs/misra/rules.rst
> @@ -68,6 +68,8 @@ maintainers if you want to suggest a change.
>         header file being included more than once
>       - Files that are intended to be included more than once do not need to
>         conform to the directive
> +     - A guard identifier is reported if the same guard identifier is redefined
> +       or undefined anywhere in the project

It cannot be another - because it would break the table. I'll fix it on
commit.

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


>     * - `Dir 4.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_11.c>`_
>       - Required
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index 80e5e972ad..f5858b00bb 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -68,6 +68,8 @@  maintainers if you want to suggest a change.
        header file being included more than once
      - Files that are intended to be included more than once do not need to
        conform to the directive
+     - A guard identifier is reported if the same guard identifier is redefined
+       or undefined anywhere in the project
 
    * - `Dir 4.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_11.c>`_
      - Required