aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libvfio-user.c2
-rw-r--r--lib/tran_pipe.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c
index 5b95865..fd2465d 100644
--- a/lib/libvfio-user.c
+++ b/lib/libvfio-user.c
@@ -469,7 +469,7 @@ vfu_create_ioeventfd(vfu_ctx_t *vfu_ctx, uint32_t region_idx, int fd,
size_t offset, uint32_t size, uint32_t flags,
uint64_t datamatch)
{
- vfu_reg_info_t *vfu_reg = &vfu_ctx->reg_info[region_idx];
+ vfu_reg_info_t *vfu_reg;
assert(vfu_ctx != NULL);
assert(fd >= 0);
diff --git a/lib/tran_pipe.c b/lib/tran_pipe.c
index 34dd075..dea2c3c 100644
--- a/lib/tran_pipe.c
+++ b/lib/tran_pipe.c
@@ -73,6 +73,10 @@ tran_pipe_send_iovec(int fd, uint16_t msg_id, bool is_reply,
ret = writev(fd, iovecs, nr_iovecs);
+ /* Quieten static analysis. */
+ iovecs[0].iov_base = NULL;
+ iovecs[0].iov_len = 0;
+
if (ret == -1) {
/* Treat a failed write due to EPIPE the same as a short write. */
if (errno == EPIPE) {