>> pcregrep -M 'sprintf\s*\(\s*([^,]*)\s*,\s*"%s[^"]*"\s*,\s*\1\s*,'
>
> the regexp doesn't search for snprintf, and doesn't look for functions spanning more than one line.
However, it appears that the multiline results did not show up in Kees’ reports, so the reports should be rerun with pcregrep -M if that is possible.
>> pcregrep -M 'sprintf\ s*\(\s* ([^,]*) \s*,\s* "%s[^"] *"\s*,\ s*\1\s* ,'
>
> the regexp doesn't search for snprintf, and doesn't look for functions spanning more than one line.
It does with pcregrep -M. For example,
$ pcregrep -M 'sprintf\ s*\(\s* ([^,]*) \s*,\s* "%s[^"] *"\s*,\ s*\1\s* ,' \ 2.6/arch/ x86/kernel/ cpu/intel_ cacheinfo. c
linux-
ret += sprintf(buf, "%sEntry: %d\n", buf, i);
ret += sprintf(buf, "%sReads: %s\tNew Entries: %s\n",
buf,
ret += sprintf(buf, "%sSubCache: %x\tIndex: %x\n",
buf, (reg & 0x30000) >> 16, reg & 0xfff);
However, it appears that the multiline results did not show up in Kees’ reports, so the reports should be rerun with pcregrep -M if that is possible.