Received: by 10.223.185.116 with SMTP id b49csp2201337wrg; Sun, 4 Mar 2018 21:22:51 -0800 (PST) X-Google-Smtp-Source: AG47ELsdVbw287DWwtbQPNdNIQAwW8PATUTQsH6r2fnMmWcLt6Y9c9ZDkn2yTyBRQLGUH302gSPa X-Received: by 10.167.129.129 with SMTP id g1mr14087213pfi.224.1520227371197; Sun, 04 Mar 2018 21:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520227371; cv=none; d=google.com; s=arc-20160816; b=u/JWqkYdlFJZJHV/WyH1BwxsicqHeKd2LiztDkk3P5UNd4FUfsc2PvEN/pB+LYxan5 /lQaApIIXnXbX05mzK1EnetDcPHLD4UQfmN1EfOYQ82GZi1n8SCv0HjvKyhUWt262Xr9 pNl7Y3sUInjXdl89OG7W4JtzigA95ML5/W86BGHmniamCZuoAxMG3OMkEbBHY18c0fpO LErELoYZCUgYxLuCg8kMehqLBsWxBp3nuRGU5CTO85oL50F8X0rH9+XQ6W2DBkvG+pAH uRNbp5NCepttfA9v+LydAh9cDHXemvNRwALESKCemriAE10wvpSczPA2SQMs+INbq3UE u0/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Le2ACXnjdA7T+MNmnFQkKLrRyG8nOx9bpU5FmFBdoFo=; b=C+aTKuLne0ynS2X4oot/V2W/Jb17Jq/2xcLx1HWxoKxSiInmnFwj4HLr9gb12OyMgt o891YG+FZRthjODSQpsH4rxXz3fPjU2XOaU5woFHGoujCLfmQehWREcV545N7JzFmy5C +dK6sqNHDPiGwAf6FCqU3oYDqmGb2LF9LubEv6b9nEMH68f1uz/tfF2zaUSiseyEw41I 44Gl+JQI6VwhS53djBlLrUO4lpBxmUKc/HjSQto+sjf6zUOKTmAj//xQjlK7eiJ0DHvu iNCFwI3jz57R6u1XCHxQ+G+FIsiwtXw7/DhKhmrQafOfXI8NSu2eizDabrs3ZnsyvxYJ khSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si9522551pfn.234.2018.03.04.21.22.36; Sun, 04 Mar 2018 21:22:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932856AbeCEFUn (ORCPT + 99 others); Mon, 5 Mar 2018 00:20:43 -0500 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:46034 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751215AbeCEFSf (ORCPT ); Mon, 5 Mar 2018 00:18:35 -0500 Received: from linuxonhyperv2.linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id siVBeG6wr3NvpsiVBeHLsn; Sun, 04 Mar 2018 22:17:33 -0700 x-originating-ip: 107.180.71.197 Received: from kys by linuxonhyperv2.linuxonhyperv.com with local (Exim 4.89_1) (envelope-from ) id 1esiVA-00050A-SJ; Sun, 04 Mar 2018 22:17:32 -0700 From: kys@exchange.microsoft.com To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, marcelo.cerri@canonical.com, sthemmin@microsoft.com Cc: Dexuan Cui , "K . Y . Srinivasan" Subject: [PATCH V2 04/12] tools: hv: fix compiler warnings about major/target_fname Date: Sun, 4 Mar 2018 22:17:14 -0700 Message-Id: <20180305051722.19157-4-kys@exchange.microsoft.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180305051722.19157-1-kys@exchange.microsoft.com> References: <20180305051539.19079-1-kys@exchange.microsoft.com> <20180305051722.19157-1-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfO3FmTSGDr+t1J2VpC6dCIL02eaZf0GUknKOk79IuzofJAxlSZ8x1gdyY9DxeXTIbeFY9CYZSt2hYaNqcAm2MYNYiaW1RdDgOZLqbXf9llZEKVRJAe6W +BCV7ExcHDOTn/qi6fLa60yqntcP4MwXB4Ao6GAgzylHDf3ZMXyZQMQG5fFhrhy2n1mItxCh9Uy91f55os9dkQnS1mvbVIiZxnJS8sWIMY0X4f2vyYW/kwbd 651Bv2KZwOuhE/tvPRgm1wwyhUZ7NtQ+rbU1AqM+9quTU0Vwt5UAbnsdxelYTuZcenypaC4rXapMTLjXuIaWVtHH0HTVrE1Wscl4dqF/rgr85j6VDea+L1WD orNDv69kFf1vTdh2yQ5aZ96LkSqD36qQ/XWyEZqNoq2e5c8nuyRcnmeePRf9nudZpI2jiVBjqvjzP0SaKSHM2GvLAVj5FKhC2UEBRgH55+jA+d5DA1PPGbpM YUa2HmaSjsIWSPxocnN4hv6ZwNN5/VKdaUEhUZydQwz/x69wEVGhFwcgC4RxtmnUpf1GcLRSVN69HllCUWwn3iT1snykX90YX2B+VWVdomhZQsAInfGLG6yt iDx6qcqdXJLhV3X9XZFXQcvU Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dexuan Cui This patch fixes the below warnings with new glibc and gcc: hv_vss_daemon.c:100:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. hv_fcopy_daemon.c:42:2: note: 'snprintf' output between 2 and 1040 bytes into a destination of size 260 Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Cc: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_fcopy_daemon.c | 3 ++- tools/hv/hv_vss_daemon.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c index 457a1521f32f..785f4e95148c 100644 --- a/tools/hv/hv_fcopy_daemon.c +++ b/tools/hv/hv_fcopy_daemon.c @@ -23,13 +23,14 @@ #include #include #include +#include #include #include #include #include static int target_fd; -static char target_fname[W_MAX_PATH]; +static char target_fname[PATH_MAX]; static unsigned long long filesize; static int hv_start_fcopy(struct hv_start_fcopy *smsg) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index b2b4ebffab8c..34031a297f02 100644 --- a/tools/hv/hv_vss_daemon.c +++ b/tools/hv/hv_vss_daemon.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include -- 2.15.1