]> git.proxmox.com Git - mirror_qemu.git/commitdiff
coverity: update model for latest tools
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 31 Mar 2022 06:24:09 +0000 (08:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Apr 2022 08:42:06 +0000 (10:42 +0200)
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>
scripts/coverity-scan/model.c

index 9d4fba53d9145b468973e09405213ada0bb4161e..686d1a30089e358e9def9e7f7b7a4c9332e07d1a 100644 (file)
@@ -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;
 }