- fixed several warnings emitted by Clang.
This commit is contained in:
parent
9c3907136d
commit
47b76180d6
12 changed files with 21 additions and 16 deletions
|
|
@ -410,7 +410,7 @@ static FString ReplayGainHash(ZMusicCustomReader* reader, int flength, int playe
|
|||
|
||||
for (size_t j = 0; j < sizeof(digest); ++j)
|
||||
{
|
||||
sprintf(digestout + (j * 2), "%02X", digest[j]);
|
||||
snprintf(digestout + (j * 2), 3, "%02X", digest[j]);
|
||||
}
|
||||
digestout[32] = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, bool quiet, L
|
|||
|
||||
for (size_t j = 0; j < sizeof(cksum); ++j)
|
||||
{
|
||||
sprintf(cksumout + (j * 2), "%02X", cksum[j]);
|
||||
snprintf(cksumout + (j * 2), 3, "%02X", cksum[j]);
|
||||
}
|
||||
|
||||
fprintf(hashfile, "file: %s, hash: %s, size: %d\n", filename, cksumout, (int)filereader.GetLength());
|
||||
|
|
@ -417,7 +417,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, bool quiet, L
|
|||
|
||||
for (size_t j = 0; j < sizeof(cksum); ++j)
|
||||
{
|
||||
sprintf(cksumout + (j * 2), "%02X", cksum[j]);
|
||||
snprintf(cksumout + (j * 2), 3, "%02X", cksum[j]);
|
||||
}
|
||||
|
||||
fprintf(hashfile, "file: %s, lump: %s, hash: %s, size: %d\n", filename, lump->getName(), cksumout, lump->LumpSize);
|
||||
|
|
|
|||
|
|
@ -528,15 +528,15 @@ const TArray<VSMatrix> IQMModel::CalculateBones(int frame1, int frame2, double i
|
|||
const TArray<TRS>& animationFrames = animationData ? *animationData : TRSData;
|
||||
if (Joints.Size() > 0)
|
||||
{
|
||||
int numbones = Joints.Size();
|
||||
int numbones = Joints.SSize();
|
||||
|
||||
if (boneComponentData->trscomponents[index].Size() != numbones)
|
||||
if (boneComponentData->trscomponents[index].SSize() != numbones)
|
||||
boneComponentData->trscomponents[index].Resize(numbones);
|
||||
if (boneComponentData->trsmatrix[index].Size() != numbones)
|
||||
if (boneComponentData->trsmatrix[index].SSize() != numbones)
|
||||
boneComponentData->trsmatrix[index].Resize(numbones);
|
||||
|
||||
frame1 = clamp(frame1, 0, ((int)animationFrames.Size() - 1) / numbones);
|
||||
frame2 = clamp(frame2, 0, ((int)animationFrames.Size() - 1) / numbones);
|
||||
frame1 = clamp(frame1, 0, (animationFrames.SSize() - 1) / numbones);
|
||||
frame2 = clamp(frame2, 0, (animationFrames.SSize() - 1) / numbones);
|
||||
|
||||
int offset1 = frame1 * numbones;
|
||||
int offset2 = frame2 * numbones;
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
|
|||
SendDlgItemMessage( hDlg, IDC_WELCOME_WIDESCREEN, BM_SETCHECK, (flags & 8) ? BST_CHECKED : BST_UNCHECKED, 0 );
|
||||
|
||||
// Set up our version string.
|
||||
sprintf(szString, "Version %s.", GetVersionString());
|
||||
snprintf(szString, sizeof(szString), "Version %s.", GetVersionString());
|
||||
SetDlgItemTextA (hDlg, IDC_WELCOME_VERSION, szString);
|
||||
|
||||
// Populate the list with all the IWADs found
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ VkRenderPassManager::VkRenderPassManager(VulkanRenderDevice* fb) : fb(fb)
|
|||
{
|
||||
std::vector<uint8_t> data;
|
||||
data.resize(fr.GetLength());
|
||||
if (fr.Read(data.data(), data.size()) == data.size())
|
||||
if (fr.Read(data.data(), data.size()) == (FileReader::Size)data.size())
|
||||
{
|
||||
builder.InitialData(data.data(), data.size());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -580,6 +580,10 @@ public:
|
|||
{
|
||||
return Count;
|
||||
}
|
||||
int SSize() const
|
||||
{
|
||||
return (int)Count;
|
||||
}
|
||||
unsigned int Max () const
|
||||
{
|
||||
return Most;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue