[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] test-qapi-visit causes clang -fsanitize=undefined warni
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] test-qapi-visit causes clang -fsanitize=undefined warning |
Date: |
Sat, 8 Mar 2014 14:03:25 +0000 |
On 8 March 2014 12:39, Peter Maydell <address@hidden> wrote:
> I've noticed that the tests/test-qapi-visit.c code provokes the following
> complaint from clang's -fsanitize=undefined undefined-behaviour
> checker when you run 'make check':
>
> tests/test-qapi-visit.c:462:33: runtime error: member access within
> null pointer of type 'UserDefA' (aka 'struct UserDefA')
There's also this clang compile warning which is probably not
related but is also in code dealing with unions:
CC tests/test-qmp-output-visitor.o
/home/petmay01/linaro/qemu-for-merges/tests/test-qmp-output-visitor.c:452:17:
warning: implicit conversion from enumeration type
'enum UserDefUnionKind' to different enumeration type
'UserDefFlatUnionKind' (aka 'enum UserDefFlatUnionKind')
[-Wenum-conversion]
tmp->kind = USER_DEF_UNION_KIND_A;
~ ^~~~~~~~~~~~~~~~~~~~~
1 warning generated.
> thanks
> -- PMM