summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-09-09 19:20:03 +0200
committerMichal Idziorek <m.i@gmx.at>2014-09-09 19:20:03 +0200
commit1580f8b4401b5f7e6ead12c94cafd42bb045ec6b (patch)
treedcf3f8f705f22bbbed8a1724291be9bac7e79eb8
parent4c0606ad1a6f60aed00b7a7866babfd011b60ef9 (diff)
started fixing gcc warnings
-rw-r--r--Makefile1
-rw-r--r--kernel/acpi.c14
2 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 5a2ded7..278f72c 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,7 @@ CC=i686-elf-gcc
CFLAGS=-ffreestanding -nostdlib -lgcc -std=gnu11
CFLAGS+= -I.
+CFLAGS+= -Wno-implicit-function-declaration
#CFLAGS+=-fdata-sections -ffunction-sections
#CFLAGS+= -Werror
diff --git a/kernel/acpi.c b/kernel/acpi.c
index 29d6f6e..9df9c33 100644
--- a/kernel/acpi.c
+++ b/kernel/acpi.c
@@ -88,16 +88,16 @@ uint8_t *apci_get_next_entry(uint8_t *addr,smp_processors *procdata)
void acpi_check_madt(uint32_t *madt,smp_processors *procdata)
{
- acpi_madt *table=*madt;
+ acpi_madt *table=(acpi_madt *)*madt;
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_DEBUG,"Looking for MADT Table at %08X.",table);
if(strcmp("APIC",table->sig,4))
{
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"Found MADT Table at 0x%08X",table);
- uint8_t *end=table;
+ uint8_t *end=(uint8_t *)table;
end+=table->length;
- uint8_t *entry=table;
+ uint8_t *entry=(uint8_t *)table;
entry+=sizeof(acpi_madt);
procdata->local_apic_address=table->apic_local;
@@ -119,7 +119,7 @@ void acpi_read_rsdt(acpi_rsdt *rsdt,smp_processors *procdata)
panic(FOOLOS_MODULE_NAME,"Signature MISMATCH!");
int entries=(rsdt->length-sizeof(acpi_rsdt))/4;
- uint32_t *first=rsdt;
+ uint32_t *first=(uint32_t *)rsdt;
first+=sizeof(acpi_rsdt)/4;
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"Entries: %d",entries);
@@ -140,11 +140,11 @@ void acpi_read_rsdt(acpi_rsdt *rsdt,smp_processors *procdata)
bool acpi_find(smp_processors *procdata)
{
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"Looking for RSDP Table");
- char *search=0x9f000; //will be 16 bit aligned;
+ char *search=(char *)0x9f000; //will be 16 bit aligned;
procdata->processors=0;
procdata->boot=0;
- while(search<=0xfffff)
+ while(search<=(char *)0xfffff)
{
if(strcmp("RSD PTR ",search,8)) // notice trailing space in "RSD PTR "
{
@@ -155,7 +155,7 @@ bool acpi_find(smp_processors *procdata)
if(checksum==0)
{
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"RSDP Table found at 0x%08X",search);
- acpi_rsdp *rsdp=search;
+ acpi_rsdp *rsdp=(acpi_rsdp *)search;
acpi_read_rsdt(rsdp->ptr_rsdt,procdata);
return true;
}