diff --git a/openmpt123/openmpt123.cpp b/openmpt123/openmpt123.cpp index 8120f67aac..b632d9f008 100644 --- a/openmpt123/openmpt123.cpp +++ b/openmpt123/openmpt123.cpp @@ -2264,26 +2264,21 @@ static mpt::uint8 main( std::vector args ) { const FILE_mode stdin_mode = mpt::contains( flags.filenames, MPT_NATIVE_PATH("-") ) ? FILE_mode::binary : FILE_mode::text; const FILE_mode stdout_mode = flags.use_stdout ? FILE_mode::binary : FILE_mode::text; - const bool stdin_text = ( stdin_mode == FILE_mode::text ); - const bool stdin_data = ( stdin_mode == FILE_mode::binary ); - const bool stdout_text = ( stdout_mode == FILE_mode::text ); - const bool stdout_data = ( stdout_mode == FILE_mode::binary ); + [[maybe_unused]] const bool stdin_text = ( stdin_mode == FILE_mode::text ); + [[maybe_unused]] const bool stdin_data = ( stdin_mode == FILE_mode::binary ); + [[maybe_unused]] const bool stdout_text = ( stdout_mode == FILE_mode::text ); + [[maybe_unused]] const bool stdout_data = ( stdout_mode == FILE_mode::binary ); // set stdin/stdout to binary for data input/output - std::optional stdin_guard{ stdin_data ? std::make_optional( stdin, FILE_mode::binary ) : std::nullopt }; - std::optional stdout_guard{ stdout_data ? std::make_optional( stdout, FILE_mode::binary ) : std::nullopt }; + [[maybe_unused]] std::optional stdin_guard{ stdin_data ? std::make_optional( stdin, FILE_mode::binary ) : std::nullopt }; + [[maybe_unused]] std::optional stdout_guard{ stdout_data ? std::make_optional( stdout, FILE_mode::binary ) : std::nullopt }; // setup terminal - std::optional input_guard{ stdin_text && ( flags.mode == Mode::UI ) ? std::make_optional() : std::nullopt }; + [[maybe_unused]] std::optional input_guard{ stdin_text && ( flags.mode == Mode::UI ) ? std::make_optional() : std::nullopt }; // choose text output between quiet/stdout/stderr textout & log = flags.quiet ? static_cast( dummy_log ) : stdout_text ? static_cast( std_out ) : static_cast( std_err ); - MPT_UNUSED( stdin_text ); - MPT_UNUSED( stdin_data ); - MPT_UNUSED( stdout_text ); - MPT_UNUSED( stdout_data ); - show_banner( log, flags.banner ); if ( !flags.warnings.empty() ) {