From owner-svn-src-all@freebsd.org Sat Dec 3 20:35:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1983C6585A; Sat, 3 Dec 2016 20:35:23 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4D858A9; Sat, 3 Dec 2016 20:35:23 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-qk0-f177.google.com with SMTP id x190so311862213qkb.0; Sat, 03 Dec 2016 12:35:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=yn+oPAz3nkAAxa+E2JTljMte2mt+eBgpUzwnUZtpArM=; b=KyrXUtccP/WwKfUl3uVaGwD8t+6vgJoGXeRMUMqdXoY1su9KL1O6DaB9TPwu/EuWNk 3UF3+2LglksMv9OcfuEs2sBDAT/drBGiAj+86GvWdsAEQqOBUuteC4mwixCT/+KDLK9d ngJV+XS0t/VRSYpA4wChyRNdduorCBdkU2JRx5FuoTE5jOCJeAa63x+i9H8qAbTbAo3+ PH+m+Q2WsBDdMUj/0NzhqJvDiZ63rFQOleX1rSwMQ+P+SBcMYUItekkB466YVcmalRTK 5yFcAYnTeIXiiW62XM1VIocwAPpuk43IndBPn7qu40KgvLqZnBbNyu9Icfq0GrRR4+wU K/YA== X-Gm-Message-State: AKaTC02uywxsh/nP5O9LJg7cl/q9CL9ObU6UfCyFrnI2yEdqQFvR+AcmuZC32+2YlIqZQg== X-Received: by 10.55.73.148 with SMTP id w142mr48616103qka.284.1480797322210; Sat, 03 Dec 2016 12:35:22 -0800 (PST) Received: from mail-qk0-f178.google.com (mail-qk0-f178.google.com. [209.85.220.178]) by smtp.gmail.com with ESMTPSA id b94sm5640467qkb.16.2016.12.03.12.35.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Dec 2016 12:35:21 -0800 (PST) Received: by mail-qk0-f178.google.com with SMTP id n204so311875983qke.2; Sat, 03 Dec 2016 12:35:21 -0800 (PST) X-Received: by 10.55.212.29 with SMTP id l29mr16206031qki.64.1480797321444; Sat, 03 Dec 2016 12:35:21 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.200.58.165 with HTTP; Sat, 3 Dec 2016 12:35:21 -0800 (PST) In-Reply-To: References: <201612012220.uB1MKSbR054941@repo.freebsd.org> From: Conrad Meyer Date: Sat, 3 Dec 2016 12:35:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r309374 - in head: sbin/camcontrol sys/cam/scsi To: Ravi Pokala Cc: Kyle Evans , "Kenneth D. Merry" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 20:35:24 -0000 On Fri, Dec 2, 2016 at 9:38 PM, Ravi Pokala wrote: > -----Original Message----- >> From: on behalf of Kyle Evans >> >> I understand that this is a bogus error because at this point it >> pretty much *has* to be set by the report_timestamp call just prior, >> but is there a clean way to trick GCC into agreeing, or is it just a >> matter of explicitly initializing it to 0 before the report_timestamp >> call? > > Actually, it's a valid warning. While all paths to that point in timestam= p() go through report_timestamp(), not all paths through report_timestamp()= set *ts. Specifically, if cam_getccb() or cam_send_ccb() fail, or the requ= est was not completed, report_timestamp() does 'goto bailout' without setti= ng *ts. But in that case, report_timestamp() returns a non-zero error. And timestamp() will goto its own bailout, avoiding use of an unset value. > I'm disappointed that `clang' (on i386 and amd64) didn't notice this; I w= as under the impression `clang' did more of that type of deep path analysis= than `gcc'. I think it's purely spurious, although understandably difficult for the compiler to notice. Adrian's proposed zero initialization seems like a fine fix. Best, Conrad