From: John Ferlan Date: Tue, 22 Jan 2013 14:40:59 +0000 (-0500) Subject: xen: Add coverity[ptr_arith] and [sign_extension] tags X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8b55992f4e6135f36f929a027f93889416625625;p=libvirt.git xen: Add coverity[ptr_arith] and [sign_extension] tags The old cpu bitmap setting algorithm causes a couple of complaints which have been tagged. --- 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;