> > Also, Coccinelle is comparing the list, but I guess you would prefer that > > it compare the set, to check for the cases where the names are the same > > but appear in a different order. > > Yes, ideally it would sort arrays before doing compare. Is that doable?
Yes. > > >> > >> > I've attached the script and some fake data that I made to test it. The > >> > fake data has some added cases where I have replaced 27 in the structure > >> > name by 07. For my test data I get: > >> > > >> > bq07421_regs and bq27421_regs have the same registers > >> > bq07000_regs and bq27000_regs have the same registers > >> > bq07421_dm_regs and bq27421_dm_regs have the same registers > >> > bq07421_props and bq27421_props have the same properties > >> > bq07000_props and bq27000_props have the same properties > > We can just write > "%s & %s are identical" OK. But just to check, there are three fields of interest: regs, dm_regs and props. If for two entries regs are the same but dm_regs and props are different, you still want a warning about regs, right? This is the behavior that seemed to be in the C code and is what I have implemented. Or do you want a warning only if all three are the same. julia _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci