summaryrefslogtreecommitdiff
path: root/coccinelle/run-coccinelle.sh
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2019-04-28 15:03:47 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2019-04-28 22:11:15 +0200
commit33af88cf70fce38a39642e92609cfba655925d55 (patch)
tree67f5296bbd8d6adb6de0658273ab825b10adf257 /coccinelle/run-coccinelle.sh
parent55033662f94baa3a1d0019f0f8398bd9d481e6be (diff)
downloadsystemd-33af88cf70fce38a39642e92609cfba655925d55.tar.gz
coccinelle: ignore macro transformations in the macros themselves
For example, the following transformation: - sizeof(s)-1 + STRLEN(s) would replace sizeof by STRLEN even in the STRLEN macro definition itself, which generates following nonsensical patch: --- src/basic/macro.h +++ /tmp/cocci-output-8753-b50773-macro.h @@ -182,7 +182,7 @@ static inline unsigned long ALIGN_POWER2 * Contrary to strlen(), this is a constant expression. * @x: a string literal. */ -#define STRLEN(x) (sizeof(""x"") - 1) +#define STRLEN(x) (STRLEN("" x "")) /* * container_of - cast a member of a structure out to the containing structure Let's exclude the macro itself from the transformation to avoid this
Diffstat (limited to 'coccinelle/run-coccinelle.sh')
0 files changed, 0 insertions, 0 deletions