diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-03-31 08:24:09 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-05 10:42:06 +0200 |
commit | fae4fad5b4b59af9cb283709b66a0680069f74ba (patch) | |
tree | 6cb92ab7f1f2d9ca2b0b162e08d8bea89b857854 /scripts | |
parent | 20661b75ea6093f5e59079d00a778a972d6732c5 (diff) | |
download | qemu-fae4fad5b4b59af9cb283709b66a0680069f74ba.zip qemu-fae4fad5b4b59af9cb283709b66a0680069f74ba.tar.gz qemu-fae4fad5b4b59af9cb283709b66a0680069f74ba.tar.bz2 |
coverity: update model for latest tools
Coverity is now rejecting incomplete types in the modeling file.
Just use a random number (in the neighborhood of the actual one)
for the size of a GIOChannel.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/coverity-scan/model.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c index 9d4fba5..686d1a3 100644 --- a/scripts/coverity-scan/model.c +++ b/scripts/coverity-scan/model.c @@ -356,7 +356,8 @@ int g_poll (GPollFD *fds, unsigned nfds, int timeout) typedef struct _GIOChannel GIOChannel; GIOChannel *g_io_channel_unix_new(int fd) { - GIOChannel *c = g_malloc0(sizeof(GIOChannel)); + /* cannot use incomplete type, the actual struct is roughly this size. */ + GIOChannel *c = g_malloc0(20 * sizeof(void *)); __coverity_escape__(fd); return c; } |