On Sun, May 24, 2020 at 09:04:15PM +0200, Luc Van Oostenryck wrote:
Hi,
I'm wondering why Sparse error/warning messages are often subtly
corrupted. For exemple:
> sparse warnings: (new ones prefixed by >>)
>
> >> fs/proc/task_nommu.c:67:55: sparse: sparse: incorrect type in argument 1
(different address spaces) @@ expected struct refcount_struct const [usertype] *r @@
got sstruct refcount_struct const [usertype] *r @@
The ending part "got sstruct" is wrong, parse correctly emits "got
struct".
> >> fs/proc/task_nommu.c:68:43: sparse: sparse: incorrect type in argument 1
(different address spaces) @@ expected void const *objp @@ got struct sighand_struct
[noderevoid const *objp @@
It's wrong here too: "got struct sighand_struct [noderevoid const *objp"
It looks like starting with the 'expected' part and ending with the 'got'
part.
It's not something new but I never bothered to repport.
It only happens with the part prefixed by '>>', I've never seen this
sort of
corruption in the other parts.
Thanks Luc for pointing out this, we will fix this
in earliest time
to make report correct.
It's maybe related to some substitution that is made to replace ":
warning:"
or ": error:" by ": sparse:" but since the flag -fdiagnostic-prefix
is used
the result is the redundant ": sparse: sparse:".
Thanks for the hint, we
will check code logic.
>
> Best regards,
> -- Luc Van Oostenryck (sparse's maintainer)