Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-08-22 22:00:52 +0200
committerMartin Hořeňovský2017-08-22 22:00:52 +0200
commita7a9be59ff9998afc3eff06300fba34cc89d4c5e (patch)
tree60aa04a7d4507efdaf936bfc6cb9f4ea63f50e9c /include
parentcb2fceb1198252d718ae9613b73d4146bf4f204a (diff)
downloadcatch3-a7a9be59ff9998afc3eff06300fba34cc89d4c5e.tar.gz
Ignore return value of getchar when waiting for keypress
Previously this was causing warnings under MSVC for ignored return value.
Diffstat (limited to 'include')
-rw-r--r--include/catch_session.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/catch_session.hpp b/include/catch_session.hpp
index 1968cb2f..a423a3be 100644
--- a/include/catch_session.hpp
+++ b/include/catch_session.hpp
@@ -201,12 +201,12 @@ namespace Catch {
int run() {
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {
Catch::cout() << "...waiting for enter/ return before starting" << std::endl;
- std::getchar();
+ static_cast<void>(std::getchar());
}
int exitCode = runInternal();
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {
Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl;
- std::getchar();
+ static_cast<void>(std::getchar());
}
return exitCode;
}