Fixed two warnings (due to -Wall).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2838 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-02-25 02:53:43 +00:00
parent bc8d3bda19
commit cc2a95b2e3
+6 -2
View File
@@ -432,7 +432,7 @@ Stream<Cache>::ReadAt(off_t pos, uint8 *buffer, size_t *_length)
run.start += (pos - offset) >> blockShift;
run.length -= (pos - offset) >> blockShift;
if ((run.length << blockShift) > length) {
if (uint32(run.length << blockShift) > length) {
if (length < blockSize) {
Cache cached(fVolume, run);
if ((block = cached.Block()) == NULL) {
@@ -453,6 +453,10 @@ Stream<Cache>::ReadAt(off_t pos, uint8 *buffer, size_t *_length)
}
int32 bytes = run.length << blockShift;
#ifdef DEBUG
if (bytes > length)
DEBUGGER("bytes greater than length");
#endif
length -= bytes;
bytesRead += bytes;
if (length == 0)
@@ -577,7 +581,7 @@ Stream<Cache>::WriteAt(Transaction *transaction, off_t pos, const uint8 *buffer,
run.start += (pos - offset) >> blockShift;
run.length -= (pos - offset) >> blockShift;
if ((run.length << blockShift) > length) {
if (uint32(run.length << blockShift) > length) {
if (length < blockSize) {
Cache cached(fVolume,run);
if ((block = cached.Block()) == NULL) {