From commits-return-8579-apmail-kudu-commits-archive=kudu.apache.org@kudu.apache.org Wed Mar 11 16:12:28 2020 Return-Path: X-Original-To: apmail-kudu-commits-archive@minotaur.apache.org Delivered-To: apmail-kudu-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 76D65194D9 for ; Wed, 11 Mar 2020 16:12:28 +0000 (UTC) Received: (qmail 25094 invoked by uid 500); 11 Mar 2020 16:12:28 -0000 Delivered-To: apmail-kudu-commits-archive@kudu.apache.org Received: (qmail 24980 invoked by uid 500); 11 Mar 2020 16:12:27 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 24951 invoked by uid 99); 11 Mar 2020 16:12:27 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2020 16:12:27 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id A50D58DACC; Wed, 11 Mar 2020 16:12:27 +0000 (UTC) Date: Wed, 11 Mar 2020 16:12:28 +0000 To: "commits@kudu.apache.org" Subject: [kudu] 01/02: [build] Fix compilation when NO_CHRONY is not defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: granthenke@apache.org In-Reply-To: <158394314760.17450.13367674692632534590@gitbox.apache.org> References: <158394314760.17450.13367674692632534590@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: kudu X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 3782dd6d74d558d9d7d9ce37a023ae290a26385c X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20200311161227.A50D58DACC@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. granthenke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git commit 3782dd6d74d558d9d7d9ce37a023ae290a26385c Author: Grant Henke AuthorDate: Wed Mar 11 09:53:55 2020 -0500 [build] Fix compilation when NO_CHRONY is not defined I found when building the test binary jar that compilation fails when `NO_CHRONY` is not defined because `num_ntp_servers` is accessed outside of the `NO_CHRONY` guard but does not exist when `!NO_CHRONY`. This patch fixes compilation by moving it into the guard. Change-Id: I9b6cc4bda188fb56f6dc4c67653ecdaecb7ad2de Reviewed-on: http://gerrit.cloudera.org:8080/15404 Tested-by: Grant Henke Reviewed-by: Adar Dembo --- src/kudu/mini-cluster/external_mini_cluster.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kudu/mini-cluster/external_mini_cluster.cc b/src/kudu/mini-cluster/external_mini_cluster.cc index e368a6e..66da128 100644 --- a/src/kudu/mini-cluster/external_mini_cluster.cc +++ b/src/kudu/mini-cluster/external_mini_cluster.cc @@ -172,10 +172,10 @@ Status ExternalMiniCluster::AddTimeSourceFlags( int idx, std::vector* flags) { DCHECK_LE(0, idx); DCHECK(flags); - CHECK_LE(0, opts_.num_ntp_servers); #if defined(NO_CHRONY) flags->emplace_back("--time_source=system_unsync"); #else + CHECK_LE(0, opts_.num_ntp_servers); if (opts_.num_ntp_servers == 0) { flags->emplace_back("--time_source=system_unsync"); } else {