From 8b55992f4e6135f36f929a027f93889416625625 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 22 Jan 2013 09:40:59 -0500 Subject: [PATCH] xen: Add coverity[ptr_arith] and [sign_extension] tags The old cpu bitmap setting algorithm causes a couple of complaints which have been tagged. --- src/xen/xen_hypervisor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index a770f53f24..bfee56dabb 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -1795,8 +1795,11 @@ virXen_setvcpumap(int handle, int id, unsigned int vcpu, return -1; memset(pm, 0, sizeof(cpumap_t)); - for (j = 0; j < maplen; j++) + for (j = 0; j < maplen; j++) { + /* coverity[ptr_arith] */ + /* coverity[sign_extension] */ *(pm + (j / 8)) |= cpumap[j] << (8 * (j & 7)); + } if (hv_versions.hypervisor == 1) { xen_op_v1 op; -- GitLab