From 1bce13e2b3b19d3286fcaed31ceaa98ba24747c7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 27 Oct 2009 12:11:24 -0400 Subject: Fix Intel compiler warnings on Windows in cmtar This commit disables or fixes some warnings in the 'cmtar' utility produced by the Intel compiler on Windows. --- Utilities/cmtar/compat/fnmatch.c | 7 +------ Utilities/cmtar/compat/snprintf.c | 4 ++++ Utilities/cmtar/libtar.c | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Utilities/cmtar/compat/fnmatch.c b/Utilities/cmtar/compat/fnmatch.c index 936f21e..bb575b3 100644 --- a/Utilities/cmtar/compat/fnmatch.c +++ b/Utilities/cmtar/compat/fnmatch.c @@ -174,12 +174,7 @@ fnmatch(pattern, string, flags) /* NOTREACHED */ } -static int -rangematch(pattern, test, flags, newp) - const char *pattern; - char test; - int flags; - char **newp; +static int rangematch(const char *pattern, char test, int flags, char **newp) { int negate, ok; char c, c2; diff --git a/Utilities/cmtar/compat/snprintf.c b/Utilities/cmtar/compat/snprintf.c index ef6e2f1..599ccfe 100644 --- a/Utilities/cmtar/compat/snprintf.c +++ b/Utilities/cmtar/compat/snprintf.c @@ -42,6 +42,10 @@ #include +#if defined(__INTEL_COMPILER) +# pragma warning disable 177 /* function declared but not referenced */ +#endif + #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) #include diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index 0d031b7..25f570f 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -312,7 +312,7 @@ extract(char *tarfile, char *rootdir) return 0; } - +#if !defined(_WIN32) || defined(__CYGWIN__) static void usage() { @@ -322,7 +322,7 @@ usage() progname); exit(-1); } - +#endif #define MODE_LIST 1 #define MODE_CREATE 2 -- cgit v0.12