[Cmake-commits] CMake branch, next, updated. v3.4.1-1900-ge859349
Brad King
brad.king at kitware.com
Mon Jan 11 11:20:40 EST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via e859349334c8e66148766e9f0acc82667a4944fd (commit)
via 9821924d45e0a9a22e8366060f41d6d87c26622f (commit)
via 8e7356a2921c769c091c52140564b04108e692c4 (commit)
from f3ea5a599f958e20a28e10365bc07253271cde04 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e859349334c8e66148766e9f0acc82667a4944fd
commit e859349334c8e66148766e9f0acc82667a4944fd
Merge: f3ea5a5 9821924
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 11 11:20:39 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 11 11:20:39 2016 -0500
Merge topic 'update-kwsys' into next
9821924d Merge branch 'upstream-KWSys' into update-kwsys
8e7356a2 KWSys 2016-01-11 (e8bf616e)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9821924d45e0a9a22e8366060f41d6d87c26622f
commit 9821924d45e0a9a22e8366060f41d6d87c26622f
Merge: cedbb79 8e7356a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 11 11:20:14 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 11 11:20:14 2016 -0500
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2016-01-11 (e8bf616e)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e7356a2921c769c091c52140564b04108e692c4
commit 8e7356a2921c769c091c52140564b04108e692c4
Author: KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Mon Jan 11 09:01:00 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 11 11:20:13 2016 -0500
KWSys 2016-01-11 (e8bf616e)
Code extracted from:
http://public.kitware.com/KWSys.git
at commit e8bf616e3556368bf19dbebcd3529a89011ebacb (master).
Upstream Shortlog
-----------------
Brad King (1):
e8bf616e SystemTools: Fix GetShortPath buffer sizing
Jan van Dorsten (1):
cfb2477d SystemTools: Simplify GetShortPath de-quoting step
Robert Maynard (1):
8ef9773d Don't use clang diagnostic pragma's when compiling with ICC on OSX.
diff --git a/MD5.c b/MD5.c
index a147057..b9d25a8 100644
--- a/MD5.c
+++ b/MD5.c
@@ -29,7 +29,7 @@
it in a single source file instead of a separate header and
implementation file. */
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-align"
#endif
@@ -433,7 +433,7 @@ static void md5_finish(md5_state_t *pms, md5_byte_t digest[16])
digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
}
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic pop
#endif
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index b0ddf5a..07c644b 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -1595,12 +1595,12 @@ static void kwsysProcessVolatileFree(volatile void* p)
{
/* clang has made it impossible to free memory that points to volatile
without first using special pragmas to disable a warning... */
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-qual"
#endif
free((void*)p); /* The cast will silence most compilers, but not clang. */
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic pop
#endif
}
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 82087f0..e3428f8 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -4491,36 +4491,27 @@ bool SystemTools::FileIsFullPath(const char* in_name, size_t len)
bool SystemTools::GetShortPath(const std::string& path, std::string& shortPath)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- const int size = int(path.size()) +1; // size of return
- char *tempPath = new char[size]; // create a buffer
- DWORD ret;
+ std::string tempPath = path; // create a buffer
// if the path passed in has quotes around it, first remove the quotes
if (!path.empty() && path[0] == '"' && *path.rbegin() == '"')
{
- strcpy(tempPath,path.c_str()+1);
- tempPath[size-2] = '\0';
- }
- else
- {
- strcpy(tempPath,path.c_str());
+ tempPath = path.substr(1, path.length()-2);
}
std::wstring wtempPath = Encoding::ToWide(tempPath);
- std::vector<wchar_t> buffer(wtempPath.size()+1);
- buffer[0] = 0;
+ DWORD ret = GetShortPathNameW(wtempPath.c_str(), NULL, 0);
+ std::vector<wchar_t> buffer(ret);
ret = GetShortPathNameW(wtempPath.c_str(),
- &buffer[0], static_cast<DWORD>(wtempPath.size()));
+ &buffer[0], static_cast<DWORD>(buffer.size()));
- if(buffer[0] == 0 || ret > wtempPath.size())
+ if (ret == 0)
{
- delete [] tempPath;
return false;
}
else
{
shortPath = Encoding::ToNarrow(&buffer[0]);
- delete [] tempPath;
return true;
}
#else
-----------------------------------------------------------------------
Summary of changes:
Source/kwsys/MD5.c | 4 ++--
Source/kwsys/ProcessUNIX.c | 4 ++--
Source/kwsys/SystemTools.cxx | 21 ++++++---------------
3 files changed, 10 insertions(+), 19 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list