From: Paolo Bonzini Date: Thu, 31 Mar 2022 06:24:09 +0000 (+0200) Subject: coverity: update model for latest tools X-Git-Tag: qemu-xen-4.17.0-rc4~9^2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fae4fad5b4b59af9cb283709b66a0680069f74ba;p=qemu-xen.git 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 --- diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c index 9d4fba53d9..686d1a3008 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; }