From f9b25d306b66bbafdbf9656103b41fbb83836d03 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 3 Jan 2010 18:09:08 -0500 Subject: [PATCH] Fix vgahook sign issue; add warning to build to catch future cases. --- Makefile | 3 ++- src/vgahooks.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1021e66..c33647e 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,8 @@ cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \ /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;) # Default compiler flags -COMMONCFLAGS = -Os -MD -Wall -Wold-style-definition -Wno-strict-aliasing \ +COMMONCFLAGS = -Os -MD -Wall -Wno-strict-aliasing -Wold-style-definition \ + $(call cc-option,$(CC),-Wtype-limits,) \ -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \ -mrtd -minline-all-stringops \ -freg-struct-return -ffreestanding -fomit-frame-pointer \ diff --git a/src/vgahooks.c b/src/vgahooks.c index 26ae156..26c5d35 100644 --- a/src/vgahooks.c +++ b/src/vgahooks.c @@ -106,7 +106,7 @@ getAMDRamSpeed(void) static void via_155f18(struct bregs *regs) { - u32 ramspeed, fbsize; + int ramspeed, fbsize; int bdf = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_K8M890CE_3); if (bdf >= 0) { -- 2.25.1