evas: improve portability of bmp loader.

On system like 64bits windows it is not a guaranty that a
sizeof (long) == sizeof (void*), we are better using the right type.
This generate a warning that we could have seen with just cross compilation.
This commit is contained in:
Cedric BAIL 2013-02-16 10:36:41 +01:00
parent 7c5e9dbd62
commit 74aa601afc
1 changed files with 9 additions and 9 deletions

View File

@ -768,7 +768,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
else
{
if ((x & 0x7) != 0) p++;
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -823,7 +823,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
else
{
if ((x & 0x1) != 0) p++;
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1012,7 +1012,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1191,7 +1191,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1225,7 +1225,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1264,7 +1264,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1352,7 +1352,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1392,7 +1392,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}
@ -1430,7 +1430,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
}
else
{
fix = (int)(((unsigned long)p) & 0x3);
fix = (int)(((uintptr_t)p) & 0x3);
if (fix > 0) p += 4 - fix; // align row read
if (p >= buffer_end) break;
}