Hello, Il giorno mar 10 mag 2022 alle ore 11:24 Julia Lawall ha scritto: > > There are also problems with some "__randomize_layout" statements, but > I've not yet isolated the minimal statement that can report > "__randomize_layout" as the global variable name. > > My assumption is that I can add defines as done in the > init_defs_builtins: /usr/local/lib/coccinelle/standard.h, but using the > -define argument with a file containing these defines does not solve the > > problem. > > Sorry for keeping this thread long, but your advice would be very > appreciated. > > -define is to indicate that a configuration variable is true. You want > --macro-file > --macro-file is probably what I needed. But for some reason, it did not do what I expected. Appending "#define __randomize_layout" to the /usr/local/lib/coccinelle/standard.h does what I expect and the "__randomize_layout" is removed from the results, but the argument "--macro-file local_def.h" with the file containing the same single statement does not. Also, for the other problem I had with the statement: ``` __printf(3, 4) __cold void _dev_printk(const char *level, const struct device *dev, const char *fmt, ...); ``` I assumed the problem to lay in the first two defines "__printf(3, 4)" and "__cold", but at least the "printf(a,b)" exists already in the default standard.h, and adding the second does not make disappear the _dev_printk from the results. Instead, it seems my problem pertains to the variadic functions. Removing the three dots by the function declaration, the entry disappears from the results. I have no clue here. Again, help is needed. Thank you > > julia >