unexpected marking of irrelevant code
Semantic patch
@display@
int i;
@@
* return -i ;
C code
int hostap_set_encryption(local_info_t *local)
{
enum { NONE, WEP, OTHER } encrypt_type;
return -1;
}
This should produce a diff that highlights (ie puts a - in front of) only return -1;. For some reason it highlights the enum line as well. This is true if you put more code between the two lines. Also if some newline are added in the semantic patch and you only highlight the -1. The problem goes away if the * is changed to a -.
Running spatch with --debug shows only one match. So this must be a pretty printing problem.
Jaskaran did something with enums recently, but I don't know if this is related.
The problem was reported by Markus Elfring.