From 57c1e8ff3a5e475ff5fe457ede46a4b3598b91f2 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 1 Dec 2011 19:13:43 +0800 Subject: [PATCH] Build - Removed -Werror from kmode to allow scan-build to be run --- BuildConf/host/{Makefile.host.cfg => Makefile.cfg} | 2 +- BuildConf/host/default.mk | 9 +++++++++ BuildConf/x86_64/Makefile.cfg | 2 +- Kernel/Makefile | 2 +- Modules/Makefile.tpl | 2 +- Modules/Storage/ATA/io.c | 13 +++++++++---- 6 files changed, 22 insertions(+), 8 deletions(-) rename BuildConf/host/{Makefile.host.cfg => Makefile.cfg} (77%) create mode 100644 BuildConf/host/default.mk diff --git a/BuildConf/host/Makefile.host.cfg b/BuildConf/host/Makefile.cfg similarity index 77% rename from BuildConf/host/Makefile.host.cfg rename to BuildConf/host/Makefile.cfg index dee50dec..1a28638e 100644 --- a/BuildConf/host/Makefile.host.cfg +++ b/BuildConf/host/Makefile.cfg @@ -6,7 +6,7 @@ SAVED_CC_ := $(CC) SAVED_LD_ := $(LD) -include $(ACESSDIR)/Makefile.x86_64.cfg +include $(ACESSDIR)/BuildConf/x86_64/Makefile.cfg OBJDUMP := objdump -S diff --git a/BuildConf/host/default.mk b/BuildConf/host/default.mk new file mode 100644 index 00000000..787d4943 --- /dev/null +++ b/BuildConf/host/default.mk @@ -0,0 +1,9 @@ + +MODULES += Storage/ATA +MODULES += Storage/FDDv2 +MODULES += Network/NE2000 Network/RTL8139 +MODULES += Display/VESA +MODULES += Display/BochsGA +MODULES += Input/PS2KbMouse +MODULES += x86/ISADMA x86/VGAText +MODULES += USB/Core USB/UHCI diff --git a/BuildConf/x86_64/Makefile.cfg b/BuildConf/x86_64/Makefile.cfg index 54bbf516..ab188fbd 100644 --- a/BuildConf/x86_64/Makefile.cfg +++ b/BuildConf/x86_64/Makefile.cfg @@ -3,7 +3,7 @@ CC = x86_64-none-elf-gcc LD = x86_64-none-elf-ld DISASM = x86_64-none-elf-objdump -d -M x86-64 -S -KERNEL_CFLAGS := -mcmodel=kernel -nostdlib -mno-red-zone -Wall -Werror +KERNEL_CFLAGS := -mcmodel=kernel -nostdlib -mno-red-zone -Wall DYNMOD_CFLAGS := -mcmodel=small -fPIC -mno-red-zone ARCHDIR = x86_64 diff --git a/Kernel/Makefile b/Kernel/Makefile index fc76c47f..c972ed48 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -21,7 +21,7 @@ MAKEDEP = $(CC) -M CPPFLAGS += -I./include -I./arch/$(ARCHDIR)/include -D_MODULE_NAME_=\"Kernel\" CPPFLAGS += -DARCH=$(ARCH) -DARCHDIR=$(ARCHDIR) -DARCHDIR_IS_$(ARCHDIR)=1 CPPFLAGS += -DKERNEL_VERSION=$(KERNEL_VERSION) -CFLAGS += -Wall -Werror -fno-stack-protector -Wstrict-prototypes -g +CFLAGS += -Wall -fno-stack-protector -Wstrict-prototypes -g CFLAGS += -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wuninitialized CFLAGS += -O3 LDFLAGS += -T arch/$(ARCHDIR)/link.ld -g diff --git a/Modules/Makefile.tpl b/Modules/Makefile.tpl index 53a059f0..f1c31a57 100644 --- a/Modules/Makefile.tpl +++ b/Modules/Makefile.tpl @@ -13,7 +13,7 @@ CPPFLAGS := -I$(ACESSDIR)/Kernel/include -I$(ACESSDIR)/Kernel/arch/$(ARCHDIR)/in CPPFLAGS += -DARCH=$(ARCH) -DARCH_is_$(ARCH) -DARCHDIR_is_$(ARCHDIR) CPPFLAGS += $(_CPPFLAGS) CPPFLAGS += $(LIBINCLUDES) -CFLAGS := -std=gnu99 -Wall -Werror -fno-stack-protector -g -O3 +CFLAGS := -std=gnu99 -Wall -fno-stack-protector -g -O3 ifneq ($(CATEGORY),) FULLNAME := $(CATEGORY)_$(NAME) diff --git a/Modules/Storage/ATA/io.c b/Modules/Storage/ATA/io.c index 128fdca0..6304cb44 100644 --- a/Modules/Storage/ATA/io.c +++ b/Modules/Storage/ATA/io.c @@ -285,7 +285,6 @@ int ATA_ReadDMA(Uint8 Disk, Uint64 Address, Uint Count, void *Buffer) int disk = Disk & 1; Uint16 base; Sint64 timeoutTime; - Uint8 val; ENTER("iDisk XAddress iCount pBuffer", Disk, Address, Count, Buffer); @@ -376,9 +375,15 @@ int ATA_ReadDMA(Uint8 Disk, Uint64 Address, Uint Count, void *Buffer) // Complete Transfer ATA_int_BusMasterWriteByte( cont * 8, 8 ); // Read and stop - val = inb(base+0x7); - LOG("Status byte = 0x%02x, Controller Status = 0x%02x", - val, ATA_int_BusMasterReadByte(cont * 8 + 2)); + #if DEBUG + { + Uint8 val = inb(base+0x7); + LOG("Status byte = 0x%02x, Controller Status = 0x%02x", + val, ATA_int_BusMasterReadByte(cont * 8 + 2)); + } + #else + inb(base+0x7); + #endif if( gaATA_IRQs[cont] == 0 ) { -- 2.20.1