Fixed GCC 4 warnings.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19055 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-10-13 10:35:04 +00:00
parent 15f45baf60
commit 134f3f10ac
3 changed files with 44 additions and 25 deletions

View File

@ -1,22 +1,27 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
/*
* Copyright 2003-2006, Haiku Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold, bonefish@users.sf.net
*/
#ifndef _DISK_DEVICE_PRIVATE_H
#define _DISK_DEVICE_PRIVATE_H
#include <DiskDeviceDefs.h>
#include <DiskDeviceVisitor.h>
class BMessenger;
class BPath;
namespace BPrivate {
// PartitionFilter
class PartitionFilter {
public:
virtual ~PartitionFilter();
virtual bool Filter(BPartition *partition, int32 level) = 0;
};

View File

@ -1,10 +1,11 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
/*
* Copyright 2003-2006, Haiku Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold, bonefish@users.sf.net
*/
#include <new>
using namespace std;
#include <DiskDevice.h>
#include <DiskDeviceList.h>
@ -15,6 +16,9 @@ using namespace std;
#include <ObjectLocker.h>
#include <Partition.h>
#include <new>
using namespace std;
using BPrivate::BObjectLocker;
// constructor
@ -612,7 +616,7 @@ BDiskDeviceList::_StopWatching()
void
BDiskDeviceList::_MountPointMoved(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
MountPointMoved(partition);
}
@ -625,7 +629,7 @@ BDiskDeviceList::_MountPointMoved(BMessage *message)
void
BDiskDeviceList::_PartitionMounted(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionMounted(partition);
}
@ -638,7 +642,7 @@ BDiskDeviceList::_PartitionMounted(BMessage *message)
void
BDiskDeviceList::_PartitionUnmounted(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionUnmounted(partition);
}
@ -651,7 +655,7 @@ BDiskDeviceList::_PartitionUnmounted(BMessage *message)
void
BDiskDeviceList::_PartitionInitialized(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionInitialized(partition);
}
@ -664,7 +668,7 @@ BDiskDeviceList::_PartitionInitialized(BMessage *message)
void
BDiskDeviceList::_PartitionResized(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionResized(partition);
}
@ -677,7 +681,7 @@ BDiskDeviceList::_PartitionResized(BMessage *message)
void
BDiskDeviceList::_PartitionMoved(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionMoved(partition);
}
@ -690,7 +694,7 @@ BDiskDeviceList::_PartitionMoved(BMessage *message)
void
BDiskDeviceList::_PartitionCreated(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionCreated(partition);
}
@ -718,7 +722,7 @@ BDiskDeviceList::_PartitionDeleted(BMessage *message)
void
BDiskDeviceList::_PartitionDefragmented(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionDefragmented(partition);
}
@ -731,7 +735,7 @@ BDiskDeviceList::_PartitionDefragmented(BMessage *message)
void
BDiskDeviceList::_PartitionRepaired(BMessage *message)
{
if (BDiskDevice *device = _UpdateDevice(message)) {
if (_UpdateDevice(message) != NULL) {
if (BPartition *partition = _FindPartition(message))
PartitionRepaired(partition);
}

View File

@ -1,13 +1,23 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
/*
* Copyright 2003-2006, Haiku Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold, bonefish@users.sf.net
*/
#include <DiskDevicePrivate.h>
#include <DiskDevice.h>
#include <Partition.h>
// PartitionFilterVisitor
PartitionFilter::~PartitionFilter()
{
}
// #pragma mark - PartitionFilterVisitor
// constructor
PartitionFilterVisitor::PartitionFilterVisitor(BDiskDeviceVisitor *visitor,