On 3/12/21 9:36 AM, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <[email protected]> writes:
> 
>> On 7/7/20 11:24 PM, Markus Armbruster wrote:
>>> From: Vladimir Sementsov-Ogievskiy <[email protected]>
>>>
>>> Script adds ERRP_GUARD() macro invocations where appropriate and
>>> does corresponding changes in code (look for details in
>>> include/qapi/error.h)
>>>
>>> Usage example:
>>> spatch --sp-file scripts/coccinelle/errp-guard.cocci \
>>>  --macro-file scripts/cocci-macro-file.h --in-place --no-show-diff \
>>>  --max-width 80 FILES...
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
>>> Reviewed-by: Markus Armbruster <[email protected]>
>>> Signed-off-by: Markus Armbruster <[email protected]>
>>> Message-Id: <[email protected]>
>>> Reviewed-by: Eric Blake <[email protected]>
>>> [ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and
>>> auto-propagated-errp.cocci to errp-guard.cocci]
>>> ---
>>>  scripts/coccinelle/errp-guard.cocci | 336 ++++++++++++++++++++++++++++
>>>  include/qapi/error.h                |   2 +
>>>  MAINTAINERS                         |   1 +
>>>  3 files changed, 339 insertions(+)
>>>  create mode 100644 scripts/coccinelle/errp-guard.cocci
>>
>> Odd, this script fails on Fedora rawhide:
>>
>> $ spatch --macro-file scripts/cocci-macro-file.h --sp-file
>> scripts/coccinelle/errp-guard.cocci --use-gitgrep --dir .
>> There is no standard.iso in /usr/lib64/coccinelle.
>> Are you sure you run a properly installed version of spatch
>> ?\ninit_defs_builtins: /usr/lib64/coccinelle/standard.h
>> init_defs: scripts/cocci-macro-file.h
>> minus: parse error:
>>   File "scripts/coccinelle/errp-guard.cocci", line 54, column 5, charpos
>> = 1899
>>   around = '<...',
>>   whole content =      <...
> 
> Double-checking: it fails only for this script, other scripts work?

Ah good point, this is the first one I checked...
I'll see with the others and update.


Reply via email to