coccinelle: Updating ignore_return to support memcpy
The return of memcpy was being ignored just like memset's return. Just adding it to coccinelle script. MISRA-C rule 17.7 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
27435e4cb3
commit
8f3459b3db
|
@ -1,7 +1,7 @@
|
||||||
/// Cast void to memset to ignore its return value
|
/// Cast void to memset to ignore its return value
|
||||||
///
|
///
|
||||||
//# The return of memset is never checked and therefore cast
|
//# The return of memset and memcpy is never checked and therefore
|
||||||
//# it to void to explicitly ignore while adhering to MISRA-C.
|
//# cast it to void to explicitly ignore while adhering to MISRA-C.
|
||||||
//
|
//
|
||||||
// Confidence: High
|
// Confidence: High
|
||||||
// Copyright (c) 2017 Intel Corporation
|
// Copyright (c) 2017 Intel Corporation
|
||||||
|
@ -13,7 +13,10 @@ virtual patch
|
||||||
@depends on patch && !(file in "ext")@
|
@depends on patch && !(file in "ext")@
|
||||||
expression e1,e2,e3;
|
expression e1,e2,e3;
|
||||||
@@
|
@@
|
||||||
|
(
|
||||||
+ (void)
|
+ (void)
|
||||||
memset(e1,e2,e3);
|
memset(e1,e2,e3);
|
||||||
|
|
|
||||||
|
+ (void)
|
||||||
|
memcpy(e1,e2,e3);
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue