Fixed various warnings.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27841 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-10-02 21:22:03 +00:00
parent ef68c59b17
commit b50e620202
12 changed files with 74 additions and 62 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ typedef struct ioapic_s {
volatile uint32 io_register_select; volatile uint32 io_register_select;
uint32 reserved[3]; uint32 reserved[3];
volatile uint32 io_window_register; volatile uint32 io_window_register;
} ioapic _PACKED; } ioapic;
static ioapic *sIOAPIC = NULL; static ioapic *sIOAPIC = NULL;
static uint32 sIOAPICMaxRedirectionEntry = 23; static uint32 sIOAPICMaxRedirectionEntry = 23;
+2
View File
@@ -26,6 +26,8 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "timers/apic.h"
//#define TRACE_ARCH_SMP //#define TRACE_ARCH_SMP
#ifdef TRACE_ARCH_SMP #ifdef TRACE_ARCH_SMP
+2
View File
@@ -78,6 +78,7 @@ free_mtrr(int32 index)
} }
#if 0
/*! /*!
Checks if the provided range overlaps an existing mtrr range Checks if the provided range overlaps an existing mtrr range
If it actually extends an existing range, extendedIndex is filled If it actually extends an existing range, extendedIndex is filled
@@ -107,6 +108,7 @@ is_memory_overlapping(uint64 base, uint64 length, int32 *extendedIndex)
} }
return false; return false;
} }
#endif // 0
static uint64 static uint64
-5
View File
@@ -7,11 +7,6 @@
#include <SupportDefs.h> #include <SupportDefs.h>
/* Method Prototypes */
static int apic_get_prio(void);
static status_t apic_set_hardware_timer(bigtime_t relativeTimeout);
static status_t apic_clear_hardware_timer(void);
static status_t apic_init(struct kernel_args *args);
status_t apic_smp_init_timer(struct kernel_args *args, int32 cpu); status_t apic_smp_init_timer(struct kernel_args *args, int32 cpu);
#endif /* _KERNEL_ARCH_x86_TIMERS_APIC_H */ #endif /* _KERNEL_ARCH_x86_TIMERS_APIC_H */
@@ -18,6 +18,13 @@
#include "apic.h" #include "apic.h"
/* Method Prototypes */
static int apic_get_prio(void);
static status_t apic_set_hardware_timer(bigtime_t relativeTimeout);
static status_t apic_clear_hardware_timer(void);
static status_t apic_init(struct kernel_args *args);
static void *sApicPtr = NULL; static void *sApicPtr = NULL;
static uint32 sApicTicsPerSec = 0; static uint32 sApicTicsPerSec = 0;
@@ -21,7 +21,6 @@
#define TRACE(x) ; #define TRACE(x) ;
#endif #endif
static uint32 sHPETAddr;
static struct hpet_regs *sHPETRegs; static struct hpet_regs *sHPETRegs;
struct timer_info gHPETTimer = { struct timer_info gHPETTimer = {
@@ -30,6 +30,21 @@
#endif #endif
IOCallback::~IOCallback()
{
}
status_t
IOCallback::DoIO(IOOperation* operation)
{
return B_ERROR;
}
// #pragma mark -
void void
IORequestOwner::Dump() const IORequestOwner::Dump() const
{ {
@@ -19,7 +19,9 @@
class IOCallback { class IOCallback {
public: public:
virtual status_t DoIO(IOOperation* operation); virtual ~IOCallback();
virtual status_t DoIO(IOOperation* operation) = 0;
}; };
typedef status_t (*io_callback)(void* data, io_operation* operation); typedef status_t (*io_callback)(void* data, io_operation* operation);
@@ -154,20 +154,6 @@ get_child_partition(partition_id partitionID, int32 index)
} }
// compare_partition_data_offset
static int
compare_partition_data_offset(const void* _a, const void* _b)
{
const partition_data* a = *(const partition_data**)_a;
const partition_data* b = *(const partition_data**)_b;
if (a->offset == b->offset)
return 0;
return a->offset < b->offset ? -1 : 1;
}
// create_child_partition // create_child_partition
partition_data * partition_data *
create_child_partition(partition_id partitionID, int32 index, create_child_partition(partition_id partitionID, int32 index,
+4
View File
@@ -1018,6 +1018,10 @@ public:
addr_t deltaFound = INT_MAX; addr_t deltaFound = INT_MAX;
bool exactMatch = false; bool exactMatch = false;
// to get rid of the erroneous "uninitialized" warnings
symbolFound.st_name = 0;
symbolFound.st_value = 0;
for (uint32 i = 0; i < hashTabSize; i++) { for (uint32 i = 0; i < hashTabSize; i++) {
uint32 bucket; uint32 bucket;
if (!_Read(&hashBuckets[i], bucket)) if (!_Read(&hashBuckets[i], bucket))
+1 -1
View File
@@ -656,7 +656,7 @@ smp_wake_up_non_boot_cpus()
void void
smp_cpu_rendezvous(volatile uint32 *var, int current_cpu) smp_cpu_rendezvous(volatile uint32 *var, int current_cpu)
{ {
atomic_or(var, 1 << current_cpu); atomic_or((vint32*)var, 1 << current_cpu);
while (*var != ((1 << sNumCPUs) - 1)) while (*var != ((1 << sNumCPUs) - 1))
PAUSE(); PAUSE();
+1 -1
View File
@@ -196,7 +196,7 @@ radix_bitmap_destroy(radix_bitmap *bmp)
static swap_addr_t static swap_addr_t
radix_leaf_alloc(radix_node *leaf, swap_addr_t slotIndex, int32 count) radix_leaf_alloc(radix_node *leaf, swap_addr_t slotIndex, int32 count)
{ {
if (count <= BITMAP_RADIX) { if (count <= (int32)BITMAP_RADIX) {
bitmap_t bitmap = ~leaf->u.bitmap; bitmap_t bitmap = ~leaf->u.bitmap;
uint32 n = BITMAP_RADIX - count; uint32 n = BITMAP_RADIX - count;
bitmap_t mask = (bitmap_t)-1 >> n; bitmap_t mask = (bitmap_t)-1 >> n;