summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <[email protected]>2023-02-15 11:08:45 +0100
committerQt Cherry-pick Bot <[email protected]>2023-02-18 20:54:27 +0000
commit4c96abdcc07a82c030f9d76ea147eda3a70360fd (patch)
tree5b13febf2b044269b50df87695d4c1c3855fd0a9
parent4034cc7c196a773b1a49a4edd81b995fab0514e1 (diff)
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 <[email protected]> (cherry picked from commit 2a69f96e162544686d7c2a31439b3ea69095162f) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r--src/tools/syncqt/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/syncqt/main.cpp b/src/tools/syncqt/main.cpp
index c64ddfa6843..6785c0c7f05 100644
--- a/src/tools/syncqt/main.cpp
+++ b/src/tools/syncqt/main.cpp
@@ -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');