RE: [PATCH 4/5] Tools: hv: address compiler warnings for hv_fcopy_daemon.c
From: KY Srinivasan
Date: Wed Dec 10 2014 - 13:55:21 EST
> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@xxxxxxxxxx]
> Sent: Tuesday, December 9, 2014 7:48 AM
> To: KY Srinivasan
> Cc: Haiyang Zhang; devel@xxxxxxxxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Dexuan Cui
> Subject: [PATCH 4/5] Tools: hv: address compiler warnings for
> hv_fcopy_daemon.c
>
> This patch addresses two types of compiler warnings:
> ... warning: unused variable âfdâ [-Wunused-variable] and ... warning: format
> â%sâ expects argument of type âchar *â, but argument 5 has type â__u16 *â [-
> Wformat=]
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> ---
> tools/hv/hv_fcopy_daemon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
> index f437d73..1a23872 100644
> --- a/tools/hv/hv_fcopy_daemon.c
> +++ b/tools/hv/hv_fcopy_daemon.c
> @@ -51,7 +51,7 @@ static int hv_start_fcopy(struct hv_start_fcopy *smsg)
>
> p = (char *)smsg->path_name;
> snprintf(target_fname, sizeof(target_fname), "%s/%s",
> - (char *)smsg->path_name, smsg->file_name);
> + (char *)smsg->path_name, (char *)smsg->file_name);
>
> syslog(LOG_INFO, "Target file name: %s", target_fname);
> /*
> @@ -137,7 +137,7 @@ void print_usage(char *argv[])
>
> int main(int argc, char *argv[])
> {
> - int fd, fcopy_fd, len;
> + int fcopy_fd, len;
> int error;
> int daemonize = 1, long_index = 0, opt;
> int version = FCOPY_CURRENT_VERSION;
> --
> 1.9.3
N§²æ¸yú²X¬¶ÇvØ)Þ{.nÇ·¥{±êX§¶¡Ü}©²ÆzÚj:+v¨¾«êZ+Êzf£¢·h§~Ûÿû®w¥¢¸?¨è&¢)ßfùy§m
á«a¶Úÿ0¶ìå