From a8c7b62ffcb8f60c0f822d1b5f40de21182fa385 Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Fri, 26 Mar 2004 14:42:21 +0000 Subject: [PATCH] Fix some compiler warnings. (Logical change 1.348) --- libntfs/attrib.c | 10 +++++----- libntfs/compress.c | 6 +++--- libntfs/runlist.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index cdd36163..9b1d8d91 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -799,7 +799,7 @@ res_err_out: /* Update progress counters. */ total += to_read; count -= to_read; - (u8*)b += to_read; + b = (u8*)b + to_read; continue; } /* It is a real lcn, read it into @dst. */ @@ -815,7 +815,7 @@ retry: if (br > 0) { total += br; count -= br; - (u8*)b += br; + b = (u8*)b + br; continue; } /* If the syscall was interrupted, try again. */ @@ -1056,7 +1056,7 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, const s64 pos, s64 count, void *b) */ total += to_write; count -= to_write; - (u8*)b += to_write; + b = (u8*)b + to_write; continue; } /* It is a real lcn, write it to the volume. */ @@ -1076,7 +1076,7 @@ retry: if (written > 0) { total += written; count -= written; - (u8*)b += written; + b = (u8*)b + written; continue; } /* If the syscall was interrupted, try again. */ @@ -1190,7 +1190,7 @@ s64 ntfs_attr_mst_pread(ntfs_attr *na, const s64 pos, const s64 bk_cnt, if (br <= 0) return br; br /= bk_size; - for (end = (u8*)b + br * bk_size; (u8*)b < end; (u8*)b += bk_size) + for (end = (u8*)b + br * bk_size; (u8*)b < end; b = (u8*)b + bk_size) ntfs_mst_post_read_fixup((NTFS_RECORD*)b, bk_size); /* Finally, return the number of blocks read. */ return br; diff --git a/libntfs/compress.c b/libntfs/compress.c index 7600f604..ed9698bc 100644 --- a/libntfs/compress.c +++ b/libntfs/compress.c @@ -360,7 +360,7 @@ do_next_cb: ofs = 0; total += to_read; count -= to_read; - (u8*)b += to_read; + b = (u8*)b + to_read; } else if (rl->length - (vcn - rl->vcn) >= cb_clusters) { s64 tdata_size, tinitialized_size; /* @@ -396,7 +396,7 @@ do_next_cb: } total += br; count -= br; - (u8*)b += br; + b = (u8*)b + br; to_read -= br; ofs += br; } while (to_read > 0); @@ -462,7 +462,7 @@ do_next_cb: memcpy(b, dest + ofs, to_read); total += to_read; count -= to_read; - (u8*)b += to_read; + b = (u8*)b + to_read; ofs = 0; } /* Do we have more work to do? */ diff --git a/libntfs/runlist.c b/libntfs/runlist.c index cec4f337..452f24a8 100644 --- a/libntfs/runlist.c +++ b/libntfs/runlist.c @@ -1049,7 +1049,7 @@ s64 ntfs_rl_pread(const ntfs_volume *vol, const runlist_element *rl, /* Update counters and proceed with next run. */ total += to_read; count -= to_read; - (u8*)b += to_read; + b = (u8*)b + to_read; continue; } /* It is a real lcn, read it from the volume. */ @@ -1062,7 +1062,7 @@ retry: if (bytes_read > 0) { total += bytes_read; count -= bytes_read; - (u8*)b += bytes_read; + b = (u8*)b + bytes_read; continue; } /* If the syscall was interrupted, try again. */ @@ -1157,7 +1157,7 @@ s64 ntfs_rl_pwrite(const ntfs_volume *vol, const runlist_element *rl, */ total += to_write; count -= to_write; - (u8*)b += to_write; + b = (u8*)b + to_write; continue; } /* It is a real lcn, write it to the volume. */ @@ -1174,7 +1174,7 @@ retry: if (written > 0) { total += written; count -= written; - (u8*)b += written; + b = (u8*)b + written; continue; } /* If the syscall was interrupted, try again. */