From patchwork Wed Aug 8 09:17:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 954857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41lm4x0PVxz9s1c for ; Wed, 8 Aug 2018 19:17:53 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="psA9QXfz"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41lm4w5mWhzDqyG for ; Wed, 8 Aug 2018 19:17:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="psA9QXfz"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41lm4q2SNWzDqhV for ; Wed, 8 Aug 2018 19:17:47 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="psA9QXfz"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 41lm4p6kFPz9s0n; Wed, 8 Aug 2018 19:17:46 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1533719866; bh=370uiuQKbQMZv89QMCuB+BjcACRpZb/eFL53GazGCLc=; h=From:To:Cc:Subject:Date:From; b=psA9QXfzLHtCe/EiwFnJ2GEaqwtRS3S2nIw+g2f13WxKuqFNMuyK2HbBBEFZ5OroA KBUiCvcv8vmIlqZlLJchwJZSjNY+7jqGb+zuk0nYHuvg/FN510X+zIivtLOnXtfzC3 QLTT4gEvUrD1zEI+zgS0lcovdLknOVSD+1WKYM64I9ZAZdyePP7BHyUj3oLNvpVQwT y4akj4NS7eQ3O5JgqBDVN2UsKhW03Ehbvrpy9BjdTbFVuAAT8V/7s3BR9wgcCo6hux U23wM+dKc+VNNvmYycWmaRIgLuNDL19CsUM9tkX9/SQBrY78fTWkhNaPDx8gbfLvh6 iApKa/lEdt0/Q== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 8 Aug 2018 19:17:40 +1000 Message-Id: <20180808091740.3917435-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.1 Subject: [Pdbg] [PATCH] libpdbg: Initialize to avoid build errors with -O3 X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index 079592c..3cf33ec 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -325,7 +325,7 @@ int ram_state_thread(struct pdbg_target *thread, struct thread_regs *regs) { struct thread_regs _regs; struct thread *t; - uint64_t value; + uint64_t value = 0; int i; if (!regs) @@ -362,7 +362,7 @@ int ram_state_thread(struct pdbg_target *thread, struct thread_regs *regs) regs->cr = 0; for (i = 0; i < 8; i++) { - uint64_t cr; + uint64_t cr = 0; ram_getcr(thread, i, &cr); regs->cr |= cr; }