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)
|
uint16 newLength, Inode *inode)
|
||||||
{
|
{
|
||||||
if (name == NULL
|
if (name == NULL
|
||||||
|| oldKey == NULL && newKey == NULL
|
|| (oldKey == NULL && newKey == NULL)
|
||||||
|| oldKey != NULL && oldLength == 0
|
|| (oldKey != NULL && oldLength == 0)
|
||||||
|| newKey != NULL && newLength == 0)
|
|| (newKey != NULL && newLength == 0))
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
// B_MIME_STRING_TYPE is the only supported non-standard type
|
// 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))
|
if (Mode() & (S_ATTR_DIR | S_INDEX_DIR))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (++count > 2 || strcmp(".", name) && strcmp("..", name))
|
if (++count > 2 || (strcmp(".", name) && strcmp("..", name)))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* Query - query parsing and evaluation
|
/*
|
||||||
*
|
* Copyright 2001-2008, Axel Dörfler, [email protected].
|
||||||
* 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, [email protected].
|
|
||||||
* This file may be used under the terms of the MIT License.
|
* 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 "Query.h"
|
||||||
#include "bfs.h"
|
#include "bfs.h"
|
||||||
@@ -1193,7 +1194,7 @@ Operator::Score() const
|
|||||||
status_t
|
status_t
|
||||||
Operator::InitCheck()
|
Operator::InitCheck()
|
||||||
{
|
{
|
||||||
if (fOp != OP_AND && fOp != OP_OR
|
if ((fOp != OP_AND && fOp != OP_OR)
|
||||||
|| fLeft == NULL || fLeft->InitCheck() < B_OK
|
|| fLeft == NULL || fLeft->InitCheck() < B_OK
|
||||||
|| fRight == NULL || fRight->InitCheck() < B_OK)
|
|| fRight == NULL || fRight->InitCheck() < B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ Volume::Mount(const char *deviceName, uint32 flags)
|
|||||||
|
|
||||||
fJournal = new Journal(this);
|
fJournal = new Journal(this);
|
||||||
// replaying the log is the first thing we will do on this disk
|
// 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) {
|
|| fBlockAllocator.Initialize() < B_OK) {
|
||||||
// ToDo: improve error reporting for a bad journal
|
// ToDo: improve error reporting for a bad journal
|
||||||
FATAL(("could not initialize journal/block bitmap allocator!\n"));
|
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) {
|
if (mask & B_STAT_MODE) {
|
||||||
PRINT(("original mode = %ld, stat->st_mode = %d\n", node.Mode(), stat->st_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
|
node.mode = HOST_ENDIAN_TO_BFS_INT32((node.Mode() & ~S_IUMSK)
|
||||||
| stat->st_mode & S_IUMSK);
|
| (stat->st_mode & S_IUMSK));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask & B_STAT_UID)
|
if (mask & B_STAT_UID)
|
||||||
|
|||||||
Reference in New Issue
Block a user