[Cocci] Why some changes are not done ?

Francois-Xavier Le Bail devel.fx.lebail at orange.fr
Fri Nov 24 11:12:55 CET 2017


I use the following Coccinelle script to rename some macros:
expression E;

on the this source:

Most of the changes are done (20).
But 2 old macro names are left.

$ git grep -n -E 'EXTRACT_[0-9]+' print-tcp.c
print-tcp.c:871:                tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4;
print-tcp.c:878:                len32 = htonl(EXTRACT_16BITS(&ip6->ip6_plen));

It seems that the problem is link to macro USES_APPLE_DEPRECATED_API on line 835.
If I comment this macro, the changes are done.
On Apple systems:
#define USES_APPLE_DEPRECATED_API DIAG_OFF(deprecated-declarations)
On other systems (like the one I use):

Did I miss something?

More information about the Cocci mailing list