| // Check violations for rule 5.7 |
| // https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_02.c |
| // Copyright: (C) 2020 Intel Corporation |
| // SPDX-License-Identifier: Apache-2.0 |
| msg = "WARNING: Violation to rule 21.2 (Should not used a reserved identifier) - {}".format(v) |
| with open("scripts/coccinelle/symbols.txt", "r") as fp: |
| symbols = fp.read().splitlines() |
| coccilib.report.print_report(p[0], msg) |
| msg = "WARNING: Violation to rule 21.2 (Should not used a reserved identifier) - {}".format(v) |
| with open("scripts/coccinelle/symbols.txt", "r") as fp: |
| symbols = fp.read().splitlines() |
| coccilib.report.print_report(p[0], msg) |
| T1 function(P1, T2 *v@p, P2) { |
| v << function_parameter.v; |
| p << function_parameter.p; |
| msg = "WARNING: Violation to rule 21.2 (Should not used a reserved identifier) - {}".format(v) |
| with open("scripts/coccinelle/symbols.txt", "r") as fp: |
| symbols = fp.read().splitlines() |
| coccilib.report.print_report(p[0], msg) |