mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
fileapi: Use unsigned int consistently for version numbers
The file API code used unsigned long to hold the major version in most places, but not all. Some places used unsigned int, and an important one of those is the cmFileApi::BuildVersion() function. As a result, it has never been safe for a large value not representable by an unsigned int to be used in these variables. Convert all of the file API version number variables and function arguments to use unsigned int consistently. This avoids any size mismatch warnings when passing values around. They also don't need to be unsigned long, as we never expect version numbers to be anything even close to what an unsigned int cannot represent.
This commit is contained in:
@@ -69,7 +69,7 @@ void WriteMessageEvent(cmConfigureLog& log, cmMakefile const& mf,
|
||||
std::string const& message)
|
||||
{
|
||||
// Keep in sync with cmFileAPIConfigureLog's DumpEventKindNames.
|
||||
static std::vector<unsigned long> const LogVersionsWithMessageV1{ 1 };
|
||||
static std::vector<unsigned int> const LogVersionsWithMessageV1{ 1 };
|
||||
|
||||
if (log.IsAnyLogVersionEnabled(LogVersionsWithMessageV1)) {
|
||||
log.BeginEvent("message-v1", mf);
|
||||
|
||||
Reference in New Issue
Block a user