From patchwork Thu Feb 24 22:47:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 84496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DD0EBB70D2 for ; Fri, 25 Feb 2011 09:45:28 +1100 (EST) Received: from localhost ([127.0.0.1]:48899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Psjw6-0002c5-0U for incoming@patchwork.ozlabs.org; Thu, 24 Feb 2011 17:45:26 -0500 Received: from [140.186.70.92] (port=51347 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Psjtn-0001Yp-VQ for qemu-devel@nongnu.org; Thu, 24 Feb 2011 17:43:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Psjtm-000550-AG for qemu-devel@nongnu.org; Thu, 24 Feb 2011 17:43:03 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]:40776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Psjtl-00053s-Kf for qemu-devel@nongnu.org; Thu, 24 Feb 2011 17:43:02 -0500 Received: from localhost.localdomain (unknown [82.241.209.44]) by smtp5-g21.free.fr (Postfix) with ESMTP id 87155D481C7; Thu, 24 Feb 2011 23:42:50 +0100 (CET) From: Corentin Chary To: Stefan Weil Date: Thu, 24 Feb 2011 23:47:08 +0100 Message-Id: <1298587628-18187-1-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.27.42.5 Cc: Corentin Chary , Anthony Liguori , Alexander Graf , Qemu-development List , Andre Przywara Subject: [Qemu-devel] [PATCH] bitops: fix test_and_change_bit() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org ./bitops.h:192: warning: ‘old’ is used uninitialized in this function Signed-off-by: Corentin Chary --- bitops.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bitops.h b/bitops.h index ae7bcb1..e2b9df3 100644 --- a/bitops.h +++ b/bitops.h @@ -187,7 +187,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); - unsigned long old; + unsigned long old = *p; *p = old ^ mask; return (old & mask) != 0;