From owner-freebsd-current@FreeBSD.ORG Mon Jun 22 23:10:15 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FC831065673; Mon, 22 Jun 2009 23:10:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mx1.freebsd.org (Postfix) with ESMTP id 18DDA8FC1C; Mon, 22 Jun 2009 23:10:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by rv-out-0506.google.com with SMTP id l9so195910rvb.3 for ; Mon, 22 Jun 2009 16:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=+dvwqbw4waxJ6ztrpSwTttG+oy2eZk3JSCNtyUEoYV8=; b=u29cAUH/LCl1DuZkC8mVdapmYsVGjbR5IjpVmpgecoP+rnXLDfty9KS5dch6ZkqHaF p+76PzJvpEPbMpUKLrP+ffopTBzVBRhjSzLRL3UFcZV971YSxip0dIBs4EzM99VEWTEu bzDBgwyX9sNRlLTKdb+QdMv0I1W3aGQpLqKh0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=N/6DAyRB26Udoc9X0oPaKSe3um6Ew4eQuEdqtkakUYDl/bWHdezhDP9PPwixROvzRm 0uTj7kEcLaKGB9n82J89MgOOsJI2lQMYaJcp7BtDXKA3/J/PTfG/g0lBhFohHnqh6t4h bxcFehEC00BjeYIDx57zC1COaRKFnNbYpaxMU= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.141.2.18 with SMTP id e18mr6219339rvi.127.1245712214749; Mon, 22 Jun 2009 16:10:14 -0700 (PDT) In-Reply-To: <4A3F6917.7040806@icyb.net.ua> References: <20090621082022.GA88526@freebsd.org> <20090622045428.GA18123@troutmask.apl.washington.edu> <4A3F6917.7040806@icyb.net.ua> Date: Tue, 23 Jun 2009 07:10:14 +0800 X-Google-Sender-Auth: bbfbe2b7e5f6f2e0 Message-ID: From: Adrian Chadd To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Roman Divacky , current@freebsd.org, Steve Kargl Subject: Re: [PATCH]: if (cond); foo() in firewire X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 23:10:15 -0000 2009/6/22 Andriy Gapon : > You confuse me. It is a "vanilla userland transfer", but so? > Current code always goes to "out" label regardless if uimove succeeded or not. > I think the idea was to go "out" only if uimove failed and execute some code > between if and out-label otherwise. Because now you have a code path being run which hasn't been run for quite a while. I'm just saying be careful, and don't assume that "clang found a bug". It found a bad code construct. Changing that bit of code changes the flow of execution and may change things unexpectedly in later code. It's the same with any bug - this "found by clang" bug should be looked at by someone who knows the firewire code and they haven't replied to this thread. :) I'm glad clang has this lexical analysis magic. Shouldn't there be some kind of weird, magical, standalone "lint" program to do this kind of lexical checking for us? :) Adrian Adrian