Corrected patch to fix warnings when compiled with GCC 4, thanks Vasilis!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24279 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -226,9 +226,9 @@ Index::Update(Transaction &transaction, const char *name, int32 type,
|
||||
uint16 newLength, Inode *inode)
|
||||
{
|
||||
if (name == NULL
|
||||
|| oldKey == NULL && newKey == NULL
|
||||
|| oldKey != NULL && oldLength == 0
|
||||
|| newKey != NULL && newLength == 0)
|
||||
|| (oldKey == NULL && newKey == NULL)
|
||||
|| (oldKey != NULL && oldLength == 0)
|
||||
|| (newKey != NULL && newLength == 0))
|
||||
return B_BAD_VALUE;
|
||||
|
||||
// B_MIME_STRING_TYPE is the only supported non-standard type
|
||||
|
||||
@@ -1245,7 +1245,7 @@ Inode::IsEmpty()
|
||||
if (Mode() & (S_ATTR_DIR | S_INDEX_DIR))
|
||||
return false;
|
||||
|
||||
if (++count > 2 || strcmp(".", name) && strcmp("..", name))
|
||||
if (++count > 2 || (strcmp(".", name) && strcmp("..", name)))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/* Query - query parsing and evaluation
|
||||
*
|
||||
* The pattern matching is roughly based on code originally written
|
||||
* by J. Kercheval, and on code written by Kenneth Almquist, though
|
||||
* it shares no code.
|
||||
*
|
||||
* Copyright 2001-2006, Axel Dörfler, axeld@pinc-software.de.
|
||||
/*
|
||||
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de.
|
||||
* This file may be used under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
/*! Query parsing and evaluation
|
||||
|
||||
The pattern matching is roughly based on code originally written
|
||||
by J. Kercheval, and on code written by Kenneth Almquist, though
|
||||
it shares no code.
|
||||
*/
|
||||
|
||||
#include "Query.h"
|
||||
#include "bfs.h"
|
||||
@@ -1190,10 +1191,10 @@ Operator::Score() const
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
status_t
|
||||
Operator::InitCheck()
|
||||
{
|
||||
if (fOp != OP_AND && fOp != OP_OR
|
||||
if ((fOp != OP_AND && fOp != OP_OR)
|
||||
|| fLeft == NULL || fLeft->InitCheck() < B_OK
|
||||
|| fRight == NULL || fRight->InitCheck() < B_OK)
|
||||
return B_ERROR;
|
||||
|
||||
@@ -360,7 +360,7 @@ Volume::Mount(const char *deviceName, uint32 flags)
|
||||
|
||||
fJournal = new Journal(this);
|
||||
// replaying the log is the first thing we will do on this disk
|
||||
if (fJournal && fJournal->InitCheck() < B_OK
|
||||
if ((fJournal != NULL && fJournal->InitCheck() < B_OK)
|
||||
|| fBlockAllocator.Initialize() < B_OK) {
|
||||
// ToDo: improve error reporting for a bad journal
|
||||
FATAL(("could not initialize journal/block bitmap allocator!\n"));
|
||||
|
||||
@@ -747,8 +747,8 @@ bfs_write_stat(void *_ns, void *_node, const struct stat *stat, uint32 mask)
|
||||
|
||||
if (mask & B_STAT_MODE) {
|
||||
PRINT(("original mode = %ld, stat->st_mode = %d\n", node.Mode(), stat->st_mode));
|
||||
node.mode = HOST_ENDIAN_TO_BFS_INT32(node.Mode() & ~S_IUMSK
|
||||
| stat->st_mode & S_IUMSK);
|
||||
node.mode = HOST_ENDIAN_TO_BFS_INT32((node.Mode() & ~S_IUMSK)
|
||||
| (stat->st_mode & S_IUMSK));
|
||||
}
|
||||
|
||||
if (mask & B_STAT_UID)
|
||||
|
||||
Reference in New Issue
Block a user