From: Stefano Stabellini Date: Fri, 26 Apr 2024 21:36:28 +0000 (-0700) Subject: docs/misra: add R21.6 R21.9 R21.10 R21.14 R21.15 R21.16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=46aa3031ae89ac1771f4159972edab65710e7349;p=people%2Faperard%2Fxen-unstable.git docs/misra: add R21.6 R21.9 R21.10 R21.14 R21.15 R21.16 Signed-off-by: Stefano Stabellini Acked-by: Andrew Cooper --- diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index d3b70fdf04..80e5e972ad 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -651,12 +651,48 @@ maintainers if you want to suggest a change. declared - See comment for Rule 21.1 + * - `Rule 21.6 `_ + - Required + - The Standard Library input/output routines shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 21.9 `_ + - Required + - The library functions bsearch and qsort of shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 21.10 `_ + - Required + - The Standard Library time and date routines shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 21.13 `_ - Mandatory - Any value passed to a function in shall be representable as an unsigned char or be the value EOF - + * - `Rule 21.14 `_ + - Required + - The Standard Library function memcmp shall not be used to compare + null terminated strings + - + + * - `Rule 21.15 `_ + - Required + - The pointer arguments to the Standard Library functions memcpy, + memmove and memcmp shall be pointers to qualified or unqualified + versions of compatible types + - + + * - `Rule 21.16 `_ + - Required + - The pointer arguments to the Standard Library function memcmp + shall point to either a pointer type, an essentially signed type, + an essentially unsigned type, an essentially Boolean type or an + essentially enum type + - void* arguments are allowed + * - `Rule 21.17 `_ - Mandatory - Use of the string handling functions from shall not result in @@ -722,3 +758,10 @@ A *switch clause* can be defined as: case/default labels". A formal definition is available within the amplification of MISRA C:2012 Rule 16.1. + +.. rubric:: Footnotes + +.. [#xen-stdlib] Xen implements itself a few functions with names that match + the corresponding function names of the Standard Library for developers' + convenience. These functions are part of the Xen code and subject to + analysis.