fix signed warnings

(Logical change 1.223)
edge.strict_endians
cantab.net!aia21 2003-11-04 13:04:07 +00:00
parent 99d25b2120
commit 9dec022b81
4 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ int ntfs_mst_post_read_fixup(NTFS_RECORD *b, const u32 size)
usa_count = le16_to_cpu(b->usa_count) - 1;
/* Size and alignment checks. */
if (size & (NTFS_SECTOR_SIZE - 1) || usa_ofs & 1 ||
usa_ofs + (usa_count * 2) > size ||
(u32)(usa_ofs + (usa_count * 2)) > size ||
(size >> NTFS_SECTOR_SIZE_BITS) != usa_count) {
errno = EINVAL;
return -1;
@ -136,7 +136,7 @@ int ntfs_mst_pre_write_fixup(NTFS_RECORD *b, const u32 size)
usa_count = le16_to_cpu(b->usa_count) - 1;
/* Size and alignment checks. */
if (size & (NTFS_SECTOR_SIZE - 1) || usa_ofs & 1 ||
usa_ofs + (usa_count * 2) > size ||
(u32)(usa_ofs + (usa_count * 2)) > size ||
(size >> NTFS_SECTOR_SIZE_BITS) != usa_count) {
errno = EINVAL;
return -1;

View File

@ -771,7 +771,7 @@ runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol,
* Allocate more memory if needed, including space for the
* not-mapped and terminator elements.
*/
if (((rlpos + 3) * sizeof(*old_rl)) > rlsize) {
if ((int)((rlpos + 3) * sizeof(*old_rl)) > rlsize) {
runlist_element *rl2;
rlsize += 0x1000;

View File

@ -342,7 +342,7 @@ int ntfs_ucstombs(const uchar_t *ins, const int ins_len, char **outs,
memset(&mbstate, 0, sizeof(mbstate));
for (i = o = 0; i < ins_len; i++) {
/* Reallocate memory if necessary or abort. */
if (o + MB_CUR_MAX > mbs_len) {
if ((int)(o + MB_CUR_MAX) > mbs_len) {
char *tc;
if (mbs == *outs) {
errno = ENAMETOOLONG;

View File

@ -839,7 +839,7 @@ ntfs_volume *ntfs_device_mount(struct ntfs_device *dev, unsigned long rwflag)
"name!");
goto error_exit;
}
for (j = 0; j < u; j++) {
for (j = 0; j < (s32)u; j++) {
uchar_t uc = le16_to_cpu(vname[j]);
if (uc > 0xff)
uc = (uchar_t)'_';