From patchwork Fri Feb 20 18:24:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44868 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3820921561 for ; Fri, 20 Feb 2015 18:25:20 +0000 (UTC) Received: by labgm9 with SMTP id gm9sf4995015lab.2 for ; Fri, 20 Feb 2015 10:25:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=fdnOvLnTV8ATnTkdiKWXl/hO7LtnAo0FqiL6pDsmXpE=; b=iksKkzSpbVA4BZn9G7Kbn1bL0/xLvZtnfz0YWmlXufZLk3fNRjsusRCUKAWdikhrPE MRF6eg11K3AoMcpZhw+kYf+s65dL6fP3GKptOSJIvFpF3fKQn4aksGIFOTf7stK2x5Ew YmZtwXhGgimwLlRSNtoTmTEIDcn8N/Jvyfga+nOe+lK3KGmLaGnxuwl0xibbuZ5ZQgkb XjOTLcha8LF6cRzZUyayGSgK7hjRtyF+OOo0XgBwUBGqMZ67uQT/wYhQAO6zfD2hu75X z8+P7jUuge17xui13eE4O/k4MP51ucSbpjOtMmkjj3NyO6aPxFcq8VgozTkAjks1MxZo j3Uw== X-Gm-Message-State: ALoCoQkE3O0SdshGijDDTHfw90Rd+HJM6gwkuRyeni/G+koZARMUYZOzTzhBuoKDVcXFkd/0AqzR X-Received: by 10.180.104.101 with SMTP id gd5mr25631wib.6.1424456719110; Fri, 20 Feb 2015 10:25:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.200 with SMTP id la8ls314979lac.90.gmail; Fri, 20 Feb 2015 10:25:18 -0800 (PST) X-Received: by 10.112.98.201 with SMTP id ek9mr9789378lbb.68.1424456718948; Fri, 20 Feb 2015 10:25:18 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id dw2si17691285lbc.62.2015.02.20.10.25.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Feb 2015 10:25:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by labgq15 with SMTP id gq15so7880006lab.6 for ; Fri, 20 Feb 2015 10:25:18 -0800 (PST) X-Received: by 10.112.57.139 with SMTP id i11mr6439364lbq.106.1424456718523; Fri, 20 Feb 2015 10:25:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp50186lbj; Fri, 20 Feb 2015 10:25:17 -0800 (PST) X-Received: by 10.140.152.10 with SMTP id 10mr24153397qhy.54.1424456717226; Fri, 20 Feb 2015 10:25:17 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id dh6si297055qcb.41.2015.02.20.10.25.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Feb 2015 10:25:17 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YOsGG-0002qo-Gm; Fri, 20 Feb 2015 18:25:12 +0000 Received: from mail-la0-f45.google.com ([209.85.215.45]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YOsGA-0002pw-RZ for lng-odp@lists.linaro.org; Fri, 20 Feb 2015 18:25:06 +0000 Received: by labgd6 with SMTP id gd6so7803594lab.7 for ; Fri, 20 Feb 2015 10:25:00 -0800 (PST) X-Received: by 10.152.7.204 with SMTP id l12mr9667160laa.1.1424456700476; Fri, 20 Feb 2015 10:25:00 -0800 (PST) Received: from localhost.localdomain (broadband-46-188-125-106.2com.net. [46.188.125.106]) by mx.google.com with ESMTPSA id i10sm5625027lah.25.2015.02.20.10.24.59 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Feb 2015 10:24:59 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 20 Feb 2015 21:24:54 +0300 Message-Id: <1424456694-21705-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: pool set seg_len to 0 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 gcc 4.9 compiles current code fine, but gcc 4.7 fails with: odp_pool.c:293:20: error: 'seg_len' may be used uninitialized in this function Problem found with gcc 4.7 and make distcheck command which added additional flags for odp compilation. If newer gcc does not warn that variable can be used uninitialized (not for packet case in this function), it looks like compiler bug. Init it to 0 because pool creation is not performance function. Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- platform/linux-generic/odp_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 8da3801..422ff2b 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -136,7 +136,7 @@ odp_pool_t odp_pool_create(const char *name, ODP_CACHE_LINE_SIZE_ROUNDUP(init_params->udata_size) : 0; - uint32_t blk_size, buf_stride, buf_num, seg_len; + uint32_t blk_size, buf_stride, buf_num, seg_len = 0; uint32_t buf_align = params->type == ODP_POOL_BUFFER ? params->buf.align : 0;