public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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
Subject: [PATCH V2 04/12] tools: hv: fix compiler warnings about major/target_fname
Date: Sun,  4 Mar 2018 22:17:14 -0700	[thread overview]
Message-ID: <20180305051722.19157-4-kys@exchange.microsoft.com> (raw)
In-Reply-To: <20180305051722.19157-1-kys@exchange.microsoft.com>

From: Dexuan Cui <decui@microsoft.com>

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 <sys/sysmacros.h>. For historical compatibility, it is currently
defined by <sys/types.h> as well, but we plan to  remove this soon.
To use "major", include <sys/sysmacros.h>  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 <decui@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 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 <unistd.h>
 #include <errno.h>
 #include <linux/hyperv.h>
+#include <linux/limits.h>
 #include <syslog.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <getopt.h>
 
 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 <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <mntent.h>
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2018-03-05  5:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05  5:15 [PATCH V2 00/12] Drivers: hv: Miscellaneous fixes kys
2018-03-05  5:17 ` [PATCH V2 01/12] tools/hv: Fix IP reporting by KVP daemon with SRIOV kys
2018-03-05  5:17   ` [PATCH V2 02/12] hyper-v: use GFP_KERNEL for hv_context.hv_numa_map kys
2018-03-05  5:17   ` [PATCH V2 03/12] hv: Synthetic typo correction kys
2018-03-05  5:17   ` kys [this message]
2018-03-05  5:17   ` [PATCH V2 05/12] tools: hv: include string.h in hv_fcopy_daemon kys
2018-03-05  5:17   ` [PATCH V2 06/12] vmbus/ring_buffer: remove some redundant helper function kys
2018-03-06 17:56     ` Greg KH
2018-03-05  5:17   ` [PATCH V2 07/12] hv_vmbus: Correct the stale comments regarding cpu affinity kys
2018-03-05  5:17   ` [PATCH V2 08/12] Drivers: hv: vmbus: Implement Direct Mode for stimer0 kys
2018-03-05  5:17   ` [PATCH V2 09/12] hv_balloon: fix printk loglevel kys
2018-03-05  5:17   ` [PATCH V2 10/12] hv_balloon: simplify hv_online_page()/hv_page_online_one() kys
2018-03-05  5:17   ` [PATCH V2 11/12] hv_balloon: fix bugs in num_pages_onlined accounting kys
2018-03-05  5:17   ` [PATCH V2 12/12] hv_balloon: trace post_status kys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180305051722.19157-4-kys@exchange.microsoft.com \
    --to=kys@exchange.microsoft.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=leann.ogasawara@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.cerri@canonical.com \
    --cc=olaf@aepfle.de \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox