From c03e8fce92de2d04843a38f589eaceffc293e257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 22 Aug 2017 22:06:37 +0200 Subject: [PATCH] Explicitly ignore return value of getchar This silences MSVC warning about ignored return value --- include/catch_session.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/catch_session.hpp b/include/catch_session.hpp index ec3ce7cc..b183d73d 100644 --- a/include/catch_session.hpp +++ b/include/catch_session.hpp @@ -208,12 +208,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(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(std::getchar()); } return exitCode; }