Fix some warnings
This commit is contained in:
parent
aa286a32f9
commit
a19f3484dd
@ -1136,19 +1136,19 @@ public:
|
||||
void readData (FILE *f)
|
||||
{
|
||||
for (int i = 0; i < height; i++) {
|
||||
if (fread(r(i), sizeof(T), width, f) < width) {
|
||||
if (fread(r(i), sizeof(T), width, f) < static_cast<size_t>(width)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < height; i++) {
|
||||
if (fread(g(i), sizeof(T), width, f) < width) {
|
||||
if (fread(g(i), sizeof(T), width, f) < static_cast<size_t>(width)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < height; i++) {
|
||||
if (fread(b(i), sizeof(T), width, f) < width) {
|
||||
if (fread(b(i), sizeof(T), width, f) < static_cast<size_t>(width)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1718,7 +1718,7 @@ public:
|
||||
void readData (FILE *f)
|
||||
{
|
||||
for (int i = 0; i < height; i++) {
|
||||
if (fread(r(i), sizeof(T), 3 * width, f) < 3 * width) {
|
||||
if (fread(r(i), sizeof(T), 3 * width, f) < 3 * static_cast<size_t>(width)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2237,7 +2237,7 @@ bool Thumbnail::readAEHistogram (const Glib::ustring& fname)
|
||||
} else {
|
||||
aeHistogram(65536 >> aeHistCompression);
|
||||
const size_t histoBytes = (65536 >> aeHistCompression) * sizeof(aeHistogram[0]);
|
||||
const int bytesRead = fread(&aeHistogram[0], 1, histoBytes, f);
|
||||
const size_t bytesRead = fread(&aeHistogram[0], 1, histoBytes, f);
|
||||
fclose (f);
|
||||
if (bytesRead != histoBytes) {
|
||||
aeHistogram.reset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user