From: John Hodge Date: Thu, 1 Dec 2011 11:13:43 +0000 (+0800) Subject: Build - Removed -Werror from kmode to allow scan-build to be run X-Git-Tag: rel0.14~43 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=57c1e8ff3a5e475ff5fe457ede46a4b3598b91f2;p=tpg%2Facess2.git Build - Removed -Werror from kmode to allow scan-build to be run --- diff --git a/BuildConf/host/Makefile.cfg b/BuildConf/host/Makefile.cfg new file mode 100644 index 00000000..1a28638e --- /dev/null +++ b/BuildConf/host/Makefile.cfg @@ -0,0 +1,15 @@ +# +# Acess2 Host Native makefile +# - Used for forcing the architecture +# + +SAVED_CC_ := $(CC) +SAVED_LD_ := $(LD) + +include $(ACESSDIR)/BuildConf/x86_64/Makefile.cfg + +OBJDUMP := objdump -S + +CC := $(SAVED_CC_) +LD := $(SAVED_LD_) + diff --git a/BuildConf/host/Makefile.host.cfg b/BuildConf/host/Makefile.host.cfg deleted file mode 100644 index dee50dec..00000000 --- a/BuildConf/host/Makefile.host.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# -# Acess2 Host Native makefile -# - Used for forcing the architecture -# - -SAVED_CC_ := $(CC) -SAVED_LD_ := $(LD) - -include $(ACESSDIR)/Makefile.x86_64.cfg - -OBJDUMP := objdump -S - -CC := $(SAVED_CC_) -LD := $(SAVED_LD_) - 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 ) {