summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-27 16:11:24 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-27 16:11:24 (GMT)
commit1bce13e2b3b19d3286fcaed31ceaa98ba24747c7 (patch)
treed355558748324c437fe177d77839a080368fd313
parent6720d31ed0aed77c5d17554c4ae616296b93f5b3 (diff)
downloadCMake-1bce13e2b3b19d3286fcaed31ceaa98ba24747c7.zip
CMake-1bce13e2b3b19d3286fcaed31ceaa98ba24747c7.tar.gz
CMake-1bce13e2b3b19d3286fcaed31ceaa98ba24747c7.tar.bz2
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.
-rw-r--r--Utilities/cmtar/compat/fnmatch.c7
-rw-r--r--Utilities/cmtar/compat/snprintf.c4
-rw-r--r--Utilities/cmtar/libtar.c4
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 <libtar/config.h>
+#if defined(__INTEL_COMPILER)
+# pragma warning disable 177 /* function declared but not referenced */
+#endif
+
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
#include <stdio.h>
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