From a863958aa4b27ab477a1926635accd681938adb7 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 10 Mar 2022 09:39:33 +0100 Subject: [PATCH] Utils: Silence MSVC deprecation warnings in tst_qtcprocess warning: C4996: 'setmode': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _setmode. See online help for details. ...same for 'fileno' Change-Id: I85090b65532b17b535914b88de835d718f654f6a Reviewed-by: Reviewed-by: Jarek Kobus --- tests/auto/utils/qtcprocess/tst_qtcprocess.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp b/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp index 9987781c9cc..a5f00166808 100644 --- a/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp +++ b/tests/auto/utils/qtcprocess/tst_qtcprocess.cpp @@ -1017,7 +1017,7 @@ void tst_QtcProcess::LineCallback::main() { #ifdef Q_OS_WIN // Prevent \r\n -> \r\r\n translation. - setmode(fileno(stderr), O_BINARY); + _setmode(_fileno(stderr), O_BINARY); #endif fprintf(stderr, "%s", QByteArray(lineCallbackData).replace('|', "").data()); exit(0);