mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 14:33:38 +00:00
doc: fix the typo related to tab
This patch fixes the typo related to tab. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
parent
8a324060c1
commit
bc107105f8
@ -125,14 +125,17 @@ Multiple return statements in a function are not allowed.
|
|||||||
|
|
||||||
Compliant example::
|
Compliant example::
|
||||||
|
|
||||||
int32_t foo(char *ptr) {
|
int32_t foo(char *ptr)
|
||||||
|
{
|
||||||
int32_t ret;
|
int32_t ret;
|
||||||
|
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
...
|
...
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1032,7 +1035,8 @@ Compliant example::
|
|||||||
|
|
||||||
#define SHOWCASE_SIZE 32U
|
#define SHOWCASE_SIZE 32U
|
||||||
|
|
||||||
void showcase(uint32_t array_source[SHOWCASE_SIZE]) {
|
void showcase(uint32_t array_source[SHOWCASE_SIZE])
|
||||||
|
{
|
||||||
uint32_t num_bytes = SHOWCASE_SIZE * sizeof(uint32_t);
|
uint32_t num_bytes = SHOWCASE_SIZE * sizeof(uint32_t);
|
||||||
|
|
||||||
printf("num_bytes %d \n", num_bytes);
|
printf("num_bytes %d \n", num_bytes);
|
||||||
@ -1044,7 +1048,8 @@ Compliant example::
|
|||||||
|
|
||||||
#define SHOWCASE_SIZE 32U
|
#define SHOWCASE_SIZE 32U
|
||||||
|
|
||||||
void showcase(uint32_t array_source[SHOWCASE_SIZE]) {
|
void showcase(uint32_t array_source[SHOWCASE_SIZE])
|
||||||
|
{
|
||||||
uint32_t num_bytes = sizeof(array_source);
|
uint32_t num_bytes = sizeof(array_source);
|
||||||
|
|
||||||
printf("num_bytes %d \n", num_bytes);
|
printf("num_bytes %d \n", num_bytes);
|
||||||
@ -1987,6 +1992,7 @@ Compliant example::
|
|||||||
default:
|
default:
|
||||||
/* showcase */
|
/* showcase */
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
.. rst-class:: non-compliant-code
|
.. rst-class:: non-compliant-code
|
||||||
|
|
||||||
@ -2010,6 +2016,7 @@ Compliant example::
|
|||||||
default:
|
default:
|
||||||
/* showcase */
|
/* showcase */
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TY-10: const qualifier shall not be discarded in cast operation
|
TY-10: const qualifier shall not be discarded in cast operation
|
||||||
|
Loading…
Reference in New Issue
Block a user