[Cmake-commits] CMake branch, next, updated. v3.6.2-2489-g3f37696

Brad King brad.king at kitware.com
Mon Sep 26 09:50:34 EDT 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  3f376968376366e0eb1b31145a2db94f53216f18 (commit)
       via  1798e49595ca5b8aa113f98a8266ef5df582a207 (commit)
       via  d15b7603aeff5e7c47ce240329414b6a0db60720 (commit)
      from  54dbd51b5bee3e51cce3b1dc14f5a2d06308f866 (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=3f376968376366e0eb1b31145a2db94f53216f18
commit 3f376968376366e0eb1b31145a2db94f53216f18
Merge: 54dbd51 1798e49
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 26 09:50:33 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 26 09:50:33 2016 -0400

    Merge topic 'update-kwsys' into next
    
    1798e495 Merge branch 'upstream-KWSys' into update-kwsys
    d15b7603 KWSys 2016-09-23 (80f820fc)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1798e49595ca5b8aa113f98a8266ef5df582a207
commit 1798e49595ca5b8aa113f98a8266ef5df582a207
Merge: a721830 d15b760
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 26 09:45:51 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 26 09:45:51 2016 -0400

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2016-09-23 (80f820fc)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d15b7603aeff5e7c47ce240329414b6a0db60720
commit d15b7603aeff5e7c47ce240329414b6a0db60720
Author:     KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Fri Sep 23 10:55:07 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 26 09:45:46 2016 -0400

    KWSys 2016-09-23 (80f820fc)
    
    Code extracted from:
    
        http://public.kitware.com/KWSys.git
    
    at commit 80f820fcbb7cb9536a7c3886fa60c5c211559daf (master).
    
    Upstream Shortlog
    -----------------
    
    Brad King (3):
          66cd1138 ConsoleBuf: Avoid unnecessary initializations in test code
          4e6c9410 ConsoleBuf: Remove extra flush operations from test code
          80f820fc ConsoleBuf: Avoid use of __FUNCTION__ in tests

diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx
index 3dc3337..d7775e6 100644
--- a/testConsoleBuf.cxx
+++ b/testConsoleBuf.cxx
@@ -103,7 +103,7 @@ static void dumpBuffers(const T *expected, const T *received, size_t size) {
     }
     std::cerr << std::endl;
   }
-  std::cerr << std::endl << std::flush;
+  std::cerr << std::endl;
 }
 
 //----------------------------------------------------------------------------
@@ -331,21 +331,23 @@ static int testPipe()
           didFail = encodedTestString.compare(buffer2) == 0 ? 0 : 1;
         }
         if (didFail != 0) {
-          std::cerr << "Pipe's output didn't match expected output!" << std::endl << std::flush;
+          std::cerr << "Pipe's output didn't match expected output!" << std::endl;
           dumpBuffers<char>(encodedTestString.c_str(), buffer, encodedTestString.size());
           dumpBuffers<char>(encodedInputTestString.c_str(), buffer + encodedTestString.size() + 1, encodedInputTestString.size());
           dumpBuffers<char>(encodedTestString.c_str(), buffer2, encodedTestString.size());
         }
       } catch (const std::runtime_error &ex) {
         DWORD lastError = GetLastError();
-        std::cerr << "In function " << __FUNCTION__ << ":" << ex.what() << std::endl << std::flush;
+        std::cerr << "In function testPipe, line " <<  __LINE__ << ": "
+                  << ex.what() << std::endl;
         displayError(lastError);
       }
       finishProcess(didFail == 0);
     }
   } catch (const std::runtime_error &ex) {
     DWORD lastError = GetLastError();
-    std::cerr << "In function " << __FUNCTION__ << ":" << ex.what() << std::endl << std::flush;
+    std::cerr << "In function testPipe, line " <<  __LINE__ << ": "
+              << ex.what() << std::endl;
     displayError(lastError);
   }
   finishPipe(inPipeRead, inPipeWrite);
@@ -368,11 +370,11 @@ static int testFile()
         (errFile = createFile(L"stderrFile.txt")) == INVALID_HANDLE_VALUE) {
       throw std::runtime_error("createFile failed!");
     }
-    int length = 0;
     DWORD bytesWritten = 0;
     char buffer[200];
     char buffer2[200];
 
+    int length;
     if ((length = WideCharToMultiByte(TestCodepage, 0, UnicodeInputTestString, -1,
                                       buffer, sizeof(buffer),
                                       NULL, NULL)) == 0) {
@@ -424,21 +426,23 @@ static int testFile()
           didFail = encodedTestString.compare(buffer2) == 0 ? 0 : 1;
         }
         if (didFail != 0) {
-          std::cerr << "File's output didn't match expected output!" << std::endl << std::flush;
+          std::cerr << "File's output didn't match expected output!" << std::endl;
           dumpBuffers<char>(encodedTestString.c_str(), buffer, encodedTestString.size());
           dumpBuffers<char>(encodedInputTestString.c_str(), buffer + encodedTestString.size() + 1, encodedInputTestString.size() - 1);
           dumpBuffers<char>(encodedTestString.c_str(), buffer2, encodedTestString.size());
         }
       } catch (const std::runtime_error &ex) {
         DWORD lastError = GetLastError();
-        std::cerr << "In function " << __FUNCTION__ << ":" << ex.what() << std::endl << std::flush;
+        std::cerr << "In function testFile, line " <<  __LINE__ << ": "
+                  << ex.what() << std::endl;
         displayError(lastError);
       }
       finishProcess(didFail == 0);
     }
   } catch (const std::runtime_error &ex) {
     DWORD lastError = GetLastError();
-    std::cerr << "In function " << __FUNCTION__ << ":" << ex.what() << std::endl << std::flush;
+    std::cerr << "In function testFile, line " <<  __LINE__ << ": "
+              << ex.what() << std::endl;
     displayError(lastError);
   }
   finishFile(inFile);
@@ -508,18 +512,18 @@ static int testConsole()
           forceNewConsole = true;
         }
       } else {
-        std::cerr << "RegGetValueW(FontFamily) failed!" << std::endl << std::flush;
+        std::cerr << "RegGetValueW(FontFamily) failed!" << std::endl;
       }
       RegCloseKey(hConsoleKey);
     } else {
-      std::cerr << "RegOpenKeyExW(HKEY_CURRENT_USER\\Console) failed!" << std::endl << std::flush;
+      std::cerr << "RegOpenKeyExW(HKEY_CURRENT_USER\\Console) failed!" << std::endl;
     }
   }
   if (forceNewConsole || GetConsoleMode(parentOut, &consoleMode) == 0) {
     // Not a real console, let's create new one.
     FreeConsole();
     if (!AllocConsole()) {
-      std::cerr << "AllocConsole failed!" << std::endl << std::flush;
+      std::cerr << "AllocConsole failed!" << std::endl;
       return didFail;
     }
     SECURITY_ATTRIBUTES securityAttributes;
@@ -561,11 +565,11 @@ static int testConsole()
         consoleFont.FontFamily = TestFontFamily;
         wcscpy(consoleFont.FaceName, TestFaceName);
         if (!setConsoleFont(hOut, FALSE, &consoleFont)) {
-          std::cerr << "SetCurrentConsoleFontEx failed!" << std::endl << std::flush;
+          std::cerr << "SetCurrentConsoleFontEx failed!" << std::endl;
         }
       }
     } else {
-      std::cerr << "GetCurrentConsoleFontEx failed!" << std::endl << std::flush;
+      std::cerr << "GetCurrentConsoleFontEx failed!" << std::endl;
     }
   } else {
 #endif
@@ -599,7 +603,7 @@ static int testConsole()
       INPUT_RECORD inputBuffer[(sizeof(UnicodeInputTestString) /
                                 sizeof(UnicodeInputTestString[0])) * 2];
       memset(&inputBuffer, 0, sizeof(inputBuffer));
-      unsigned int i = 0;
+      unsigned int i;
       for (i = 0; i < (sizeof(UnicodeInputTestString) /
                        sizeof(UnicodeInputTestString[0]) - 1); i++) {
         writeInputKeyEvent(&inputBuffer[i*2], UnicodeInputTestString[i]);
@@ -650,7 +654,7 @@ static int testConsole()
       ) {
         didFail = 0;
       } else {
-        std::cerr << "Console's output didn't match expected output!" << std::endl << std::flush;
+        std::cerr << "Console's output didn't match expected output!" << std::endl;
         dumpBuffers<wchar_t>(wideTestString.c_str(), outputBuffer, wideTestString.size());
         dumpBuffers<wchar_t>(wideTestString.c_str(), outputBuffer + screenBufferInfo.dwSize.X * 1, wideTestString.size());
         dumpBuffers<wchar_t>(UnicodeInputTestString, outputBuffer + screenBufferInfo.dwSize.X * 2, (sizeof(UnicodeInputTestString) - 1) / sizeof(WCHAR));
@@ -659,7 +663,8 @@ static int testConsole()
       delete[] outputBuffer;
     } catch (const std::runtime_error &ex) {
       DWORD lastError = GetLastError();
-      std::cerr << "In function " << __FUNCTION__ << ":" << ex.what() << std::endl << std::flush;
+      std::cerr << "In function testConsole, line " <<  __LINE__ << ": "
+                << ex.what() << std::endl;
       displayError(lastError);
     }
     finishProcess(didFail == 0);

-----------------------------------------------------------------------

Summary of changes:
 Source/kwsys/testConsoleBuf.cxx |   37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list