Fix syncqt.cpp build warnings
Remove the deprecated timeStamp argument from the parseHeader function. Fix signed/unsigned comparison between file size and buffer size. User the correct oder when initializing variables. Change-Id: I483cc175c9aaf42917053b6731833e1b4f5cad3a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 2a69f96e162544686d7c2a31439b3ea69095162f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
4034cc7c19
commit
4c96abdcc0
@ -532,9 +532,9 @@ public:
|
||||
SyncScanner(CommandLineOptions *commandLineArgs)
|
||||
: m_commandLineArgs(commandLineArgs),
|
||||
m_masterHeaderContents(MasterHeaderIncludeComparator),
|
||||
m_warningMessagePreamble(WarningMessagePreamble),
|
||||
m_outputRootName(
|
||||
std::filesystem::weakly_canonical(m_commandLineArgs->includeDir()).root_name())
|
||||
std::filesystem::weakly_canonical(m_commandLineArgs->includeDir()).root_name()),
|
||||
m_warningMessagePreamble(WarningMessagePreamble)
|
||||
{
|
||||
}
|
||||
|
||||
@ -829,7 +829,7 @@ public:
|
||||
ParsingResult parsingResult;
|
||||
parsingResult.masterInclude = m_currentFileInSourceDir && !isExport && !is3rdParty
|
||||
&& !isQpa && !isPrivate && !isGenerated;
|
||||
if (!parseHeader(headerFile, originalStamp, parsingResult, skipChecks))
|
||||
if (!parseHeader(headerFile, parsingResult, skipChecks))
|
||||
return false;
|
||||
|
||||
// Record the private header file inside the version script content.
|
||||
@ -936,7 +936,7 @@ public:
|
||||
// 'result' the function output value that stores the result of parsing.
|
||||
// 'skipChecks' checks that are not applicable for the header file.
|
||||
[[nodiscard]] bool parseHeader(const std::filesystem::path &headerFile,
|
||||
const FileStamp &timeStamp, ParsingResult &result,
|
||||
ParsingResult &result,
|
||||
unsigned int skipChecks)
|
||||
{
|
||||
if (m_commandLineArgs->showOnly())
|
||||
@ -1551,7 +1551,7 @@ bool SyncScanner::writeIfDifferent(const std::string &outputFile, const std::str
|
||||
if (!std::filesystem::exists(outputDirectory))
|
||||
std::filesystem::create_directories(outputDirectory);
|
||||
|
||||
int expectedSize = buffer.size();
|
||||
auto expectedSize = buffer.size();
|
||||
#ifdef _WINDOWS
|
||||
// File on disk has \r\n instead of just \n
|
||||
expectedSize += std::count(buffer.begin(), buffer.end(), '\n');
|
||||
|
Loading…
x
Reference in New Issue
Block a user