From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: [PATCH for-4.6] libxl: don't shadow global "socket" in psr code Date: Wed, 30 Sep 2015 15:54:11 +0100 Message-ID: <1443624851-27390-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZhIls-0001TP-Vk for xen-devel@lists.xenproject.org; Wed, 30 Sep 2015 14:54:17 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Wei Liu , olaf@aepfle.de, Ian Jackson , Ian Campbell , Chao Peng List-Id: xen-devel@lists.xenproject.org SLES11 and OpenSUSE 11.4 complain: [ 1227s] libxl_psr.c: In function 'libxl_psr_cat_get_l3_info': [ 1227s] libxl_psr.c:342: error: declaration of 'socket' shadows a > global declaration Change "socket" to "socketid" to fix the problem. Reported-by: Olaf Hering Signed-off-by: Wei Liu Cc: Chao Peng --- tools/libxl/libxl_psr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index 30740a1..000d748 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -339,7 +339,7 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info, { GC_INIT(ctx); int rc; - int i = 0, socket, nr_sockets; + int i = 0, socketid, nr_sockets; libxl_bitmap socketmap; libxl_psr_cat_info *ptr; @@ -360,10 +360,10 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info, ptr = libxl__malloc(NOGC, nr_sockets * sizeof(libxl_psr_cat_info)); - libxl_for_each_set_bit(socket, socketmap) { - ptr[i].id = socket; - if (xc_psr_cat_get_l3_info(ctx->xch, socket, &ptr[i].cos_max, - &ptr[i].cbm_len)) { + libxl_for_each_set_bit(socketid, socketmap) { + ptr[i].id = socketid; + if (xc_psr_cat_get_l3_info(ctx->xch, socketid, &ptr[i].cos_max, + &ptr[i].cbm_len)) { libxl__psr_cat_log_err_msg(gc, errno); rc = ERROR_FAIL; free(ptr); -- 2.5.3