From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mp0gV-0003Ks-4T for mharc-grub-devel@gnu.org; Sat, 19 Sep 2009 10:13:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mp0gT-0003Kf-TW for grub-devel@gnu.org; Sat, 19 Sep 2009 10:13:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mp0gO-0003KT-Bg for grub-devel@gnu.org; Sat, 19 Sep 2009 10:13:04 -0400 Received: from [199.232.76.173] (port=56646 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mp0gO-0003KQ-5B for grub-devel@gnu.org; Sat, 19 Sep 2009 10:13:00 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:58702) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mp0gN-0003uF-RS for grub-devel@gnu.org; Sat, 19 Sep 2009 10:13:00 -0400 Received: by fg-out-1718.google.com with SMTP id e21so444282fga.12 for ; Sat, 19 Sep 2009 07:12:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=oAyX6ixj38MPCK0/Mmu5agKjTSTnCYBBI8gMtUVxz+w=; b=DKvZtiXiyg/ll7lG+nidKTKmaUyHMcetxVVAgb670Fj6LeDDA1xNdDZ67aP1/RYV8O jpZr/28tFVLl6fYjmFcEHmfv8FSZG8s9YiGwDleNeUAyesfObKBPORTcrpAvYppTJN7m p7uutZQcTgvw2wRdBbTdz1NMgTlHC0321x+xk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=bt9huQpZh3jITCNPEx3KSSQjEGEw96SZ+GEFIkXUObmp1SeWs5iTg+rQIgN/q/pXKq z94EAXSCiLDYYjXkTsy+gVTwd0VlPgjrdaUZTX/BcVGcXV4aa0Nj1dogxG5GW6TL4qfC cF1oJm4khyuPiJjBmSw0SPRbXJ3CR3YbukdOw= Received: by 10.86.18.34 with SMTP id 34mr2803848fgr.2.1253369579087; Sat, 19 Sep 2009 07:12:59 -0700 (PDT) Received: from ?192.168.1.16? ([81.62.179.235]) by mx.google.com with ESMTPS id 4sm2088091fgg.8.2009.09.19.07.12.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 19 Sep 2009 07:12:57 -0700 (PDT) Message-ID: <4AB4E6EB.4010307@gmail.com> Date: Sat, 19 Sep 2009 16:12:59 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: The development of GRUB 2 References: <20090916194214.GA22363@thorin> In-Reply-To: <20090916194214.GA22363@thorin> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: rmh@aybabtu.com Subject: Re: -Werror and --disable-werror X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Sep 2009 14:13:06 -0000 Robert Millan wrote: > Hi, > > -Werror is not in effect. This will help ensuring that all new code is > checked to be warning-free before commit (incidentally, I found a newly > introduced bug thanks to this just minutes before enabling it). > > If you mean this change: + /* Any value different than `p.offset' will satisfy the check during + first loop. */ + lastaddr = !p.offset; + Then there was no bug here. if (labeln && lastaddr == p.offset) return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected"); labeln++; if ((labeln & (labeln - 1)) == 0) lastaddr = p.offset; labeln is 0 during first loop run and then lastaddr is set. I explicitly omitted initing variables to have smaller loop detector > Since -Werror may be a problem in some situations, I've added a > --disable-werror switch, which does the obvious thing. > >