Be sure to add "void" to all function prototypes that take no args.

Omitting "void" leads to a K&R style declaration which was not intended.
diff --git a/Makefile b/Makefile
index a4463bd..1021e66 100644
--- a/Makefile
+++ b/Makefile
@@ -25,12 +25,12 @@
               /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
 
 # Default compiler flags
-COMMONCFLAGS = -Wall -Os -MD -m32 -march=i386 -mregparm=3 \
-               -mpreferred-stack-boundary=2 -mrtd -freg-struct-return \
-               -ffreestanding -fomit-frame-pointer \
-               -fno-delete-null-pointer-checks -Wno-strict-aliasing \
-               -ffunction-sections -fdata-sections -fno-common \
-               -minline-all-stringops
+COMMONCFLAGS = -Os -MD -Wall -Wold-style-definition -Wno-strict-aliasing \
+               -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \
+               -mrtd -minline-all-stringops \
+               -freg-struct-return -ffreestanding -fomit-frame-pointer \
+               -fno-delete-null-pointer-checks \
+               -ffunction-sections -fdata-sections -fno-common
 COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
diff --git a/src/acpi.c b/src/acpi.c
index 9e5a4fc..f613b03 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -677,7 +677,7 @@
 }
 
 u32
-find_resume_vector()
+find_resume_vector(void)
 {
     dprintf(4, "rsdp=%p\n", RsdpAddr);
     if (!RsdpAddr || RsdpAddr->signature != RSDP_SIGNATURE)
diff --git a/src/acpi.h b/src/acpi.h
index 63d3024..c3ae84c 100644
--- a/src/acpi.h
+++ b/src/acpi.h
@@ -4,7 +4,7 @@
 #include "types.h" // u32
 
 void acpi_bios_init(void);
-u32 find_resume_vector();
+u32 find_resume_vector(void);
 
 #define RSDP_SIGNATURE 0x2052545020445352LL // "RSD PTR "
 
diff --git a/src/apm.c b/src/apm.c
index f30c22c..479d47c 100644
--- a/src/apm.c
+++ b/src/apm.c
@@ -53,8 +53,8 @@
 }
 
 // Assembler entry points defined in romlayout.S
-extern void apm16protected_entry();
-extern void apm32protected_entry();
+extern void apm16protected_entry(void);
+extern void apm32protected_entry(void);
 
 // APM 16 bit protected mode interface connect
 static void
diff --git a/src/ata.c b/src/ata.c
index 90e0392..add1d67 100644
--- a/src/ata.c
+++ b/src/ata.c
@@ -990,7 +990,7 @@
 
 // Locate and init ata controllers.
 static void
-ata_init()
+ata_init(void)
 {
     // Scan PCI bus for ATA adapters
     int count=0, pcicount=0;
@@ -1052,7 +1052,7 @@
 }
 
 void
-ata_setup()
+ata_setup(void)
 {
     if (!CONFIG_ATA)
         return;
diff --git a/src/ata.h b/src/ata.h
index 149bacf..df53a01 100644
--- a/src/ata.h
+++ b/src/ata.h
@@ -17,7 +17,7 @@
 int cdrom_read(struct disk_op_s *op);
 int ata_cmd_packet(struct drive_s *drive_g, u8 *cmdbuf, u8 cmdlen
                    , u32 length, void *buf_fl);
-void ata_setup();
+void ata_setup(void);
 int process_ata_op(struct disk_op_s *op);
 int process_atapi_op(struct disk_op_s *op);
 void describe_ata(struct drive_s *drive_g);
diff --git a/src/biosvar.h b/src/biosvar.h
index db6783e..b6e061b 100644
--- a/src/biosvar.h
+++ b/src/biosvar.h
@@ -232,11 +232,11 @@
     FLATPTR_TO_SEG(BUILD_LOWRAM_END - EBDA_SIZE_START*1024)
 
 // Accessor functions
-static inline u16 get_ebda_seg() {
+static inline u16 get_ebda_seg(void) {
     return GET_BDA(ebda_seg);
 }
 static inline struct extended_bios_data_area_s *
-get_ebda_ptr()
+get_ebda_ptr(void)
 {
     ASSERT32FLAT();
     return MAKE_FLATPTR(get_ebda_seg(), 0);
@@ -279,7 +279,7 @@
     return 0;
 }
 #endif
-static inline u16 get_global_seg() {
+static inline u16 get_global_seg(void) {
     return GET_SEG(GLOBAL_SEGREG);
 }
 #define GET_GLOBAL(var)                                                 \
diff --git a/src/block.c b/src/block.c
index 3fb5e91..c6787e2 100644
--- a/src/block.c
+++ b/src/block.c
@@ -31,7 +31,7 @@
 }
 
 struct drive_s *
-allocDrive()
+allocDrive(void)
 {
     int driveid = Drives.drivecount;
     if (driveid >= ARRAY_SIZE(Drives.drives))
@@ -369,7 +369,7 @@
  ****************************************************************/
 
 void
-drive_setup()
+drive_setup(void)
 {
     memset(&Drives, 0, sizeof(Drives));
     memset(&Drives.idmap, 0xff, sizeof(Drives.idmap));
diff --git a/src/boot.c b/src/boot.c
index c427c00..151b0d3 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -22,7 +22,7 @@
  ****************************************************************/
 
 void
-boot_setup()
+boot_setup(void)
 {
     if (! CONFIG_BOOT)
         return;
@@ -222,7 +222,7 @@
 
 // Show IPL option menu.
 static void
-interactive_bootmenu()
+interactive_bootmenu(void)
 {
     if (! CONFIG_BOOTMENU || ! qemu_cfg_show_boot_menu())
         return;
@@ -309,7 +309,7 @@
 
 // Prepare for boot - show menu and run bcvs.
 void
-boot_prep()
+boot_prep(void)
 {
     if (! CONFIG_BOOT)
         return;
@@ -487,7 +487,7 @@
 
 // Boot Failure recovery: try the next device.
 void VISIBLE32FLAT
-handle_18()
+handle_18(void)
 {
     debug_serial_setup();
     debug_enter(NULL, DEBUG_HDL_18);
@@ -499,7 +499,7 @@
 
 // INT 19h Boot Load Service Entry Point
 void VISIBLE32FLAT
-handle_19()
+handle_19(void)
 {
     debug_serial_setup();
     debug_enter(NULL, DEBUG_HDL_19);
diff --git a/src/boot.h b/src/boot.h
index 1aa1bdc..db046e3 100644
--- a/src/boot.h
+++ b/src/boot.h
@@ -38,11 +38,11 @@
 
 // boot.c
 extern struct ipl_s IPL;
-void boot_setup();
+void boot_setup(void);
 void add_bev(u16 seg, u16 bev, u16 desc);
 void add_bcv(u16 seg, u16 ip, u16 desc);
 struct drive_s;
 void add_bcv_internal(struct drive_s *drive_g);
-void boot_prep();
+void boot_prep(void);
 
 #endif // __BOOT_H
diff --git a/src/cdrom.c b/src/cdrom.c
index 8d1ec9a..883bffa 100644
--- a/src/cdrom.c
+++ b/src/cdrom.c
@@ -107,7 +107,7 @@
 struct drive_s *cdemu_drive VAR16VISIBLE;
 
 void
-cdemu_setup()
+cdemu_setup(void)
 {
     if (!CONFIG_CDROM_EMU)
         return;
diff --git a/src/clock.c b/src/clock.c
index 6b4acb9..e32bf1b 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -62,7 +62,7 @@
 u32 cpu_khz VAR16VISIBLE;
 
 static void
-calibrate_tsc()
+calibrate_tsc(void)
 {
     // Setup "timer2"
     u8 orig = inb(PORT_PS2_CTRLB);
@@ -150,7 +150,7 @@
  ****************************************************************/
 
 static int
-rtc_updating()
+rtc_updating(void)
 {
     // This function checks to see if the update-in-progress bit
     // is set in CMOS Status Register A.  If not, it returns 0.
@@ -173,7 +173,7 @@
 }
 
 static void
-pit_setup()
+pit_setup(void)
 {
     // timer0: binary count, 16bit count, mode 2
     outb(PM_SEL_TIMER0|PM_ACCESS_WORD|PM_MODE2|PM_CNT_BINARY, PORT_PIT_MODE);
@@ -183,7 +183,7 @@
 }
 
 static void
-init_rtc()
+init_rtc(void)
 {
     outb_cmos(0x26, CMOS_STATUS_A);    // 32,768Khz src, 976.5625us updates
     u8 regB = inb_cmos(CMOS_STATUS_B);
@@ -199,7 +199,7 @@
 }
 
 void
-timer_setup()
+timer_setup(void)
 {
     dprintf(3, "init timer\n");
     calibrate_tsc();
@@ -435,7 +435,7 @@
 
 // INT 08h System Timer ISR Entry Point
 void VISIBLE16
-handle_08()
+handle_08(void)
 {
     debug_isr(DEBUG_ISR_08);
 
@@ -467,7 +467,7 @@
  ****************************************************************/
 
 void
-useRTC()
+useRTC(void)
 {
     u16 ebda_seg = get_ebda_seg();
     int count = GET_EBDA2(ebda_seg, RTCusers);
@@ -480,7 +480,7 @@
 }
 
 void
-releaseRTC()
+releaseRTC(void)
 {
     u16 ebda_seg = get_ebda_seg();
     int count = GET_EBDA2(ebda_seg, RTCusers);
@@ -507,7 +507,7 @@
 }
 
 static void
-clear_usertimer()
+clear_usertimer(void)
 {
     if (!(GET_BDA(rtc_wait_flag) & RWS_WAIT_PENDING))
         return;
@@ -576,7 +576,7 @@
 
 // int70h: IRQ8 - CMOS RTC
 void VISIBLE16
-handle_70()
+handle_70(void)
 {
     debug_isr(DEBUG_ISR_70);
 
diff --git a/src/coreboot.c b/src/coreboot.c
index 3dc6a7f..7ad46ce 100644
--- a/src/coreboot.c
+++ b/src/coreboot.c
@@ -122,7 +122,7 @@
 
 // Populate max ram and e820 map info by scanning for a coreboot table.
 static void
-coreboot_fill_map()
+coreboot_fill_map(void)
 {
     dprintf(3, "Attempting to find coreboot table\n");
 
@@ -282,7 +282,7 @@
 }
 
 void
-coreboot_copy_biostable()
+coreboot_copy_biostable(void)
 {
     struct cb_memory *cbm = CBMemTable;
     if (! CONFIG_COREBOOT || !cbm)
@@ -368,7 +368,7 @@
 static struct cbfs_header *CBHDR;
 
 static void
-cbfs_setup()
+cbfs_setup(void)
 {
     if (! CONFIG_COREBOOT_FLASH)
         return;
@@ -411,7 +411,7 @@
 
 // Return the first file in the CBFS archive
 static struct cbfs_file *
-cbfs_getfirst()
+cbfs_getfirst(void)
 {
     if (! CBHDR)
         return NULL;
diff --git a/src/disk.c b/src/disk.c
index 70f237f..4457ea9 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -852,7 +852,7 @@
 
 // record completion in BIOS task complete flag
 void VISIBLE16
-handle_76()
+handle_76(void)
 {
     debug_isr(DEBUG_ISR_76);
     SET_BDA(disk_interrupt_flag, 0xff);
diff --git a/src/disk.h b/src/disk.h
index 7feb9af..ac5748e 100644
--- a/src/disk.h
+++ b/src/disk.h
@@ -230,7 +230,7 @@
 // block.c
 extern struct drives_s Drives;
 struct drive_s *getDrive(u8 exttype, u8 extdriveoffset);
-struct drive_s *allocDrive();
+struct drive_s *allocDrive(void);
 void setup_translation(struct drive_s *drive_g);
 void map_floppy_drive(struct drive_s *drive_g);
 void map_hd_drive(struct drive_s *drive_g);
@@ -238,27 +238,27 @@
 void describe_drive(struct drive_s *drive_g);
 int process_op(struct disk_op_s *op);
 int send_disk_op(struct disk_op_s *op);
-void drive_setup();
+void drive_setup(void);
 
 // floppy.c
 extern struct floppy_ext_dbt_s diskette_param_table2;
-void floppy_setup();
+void floppy_setup(void);
 struct drive_s *addFloppy(int floppyid, int ftype, int driver);
 void describe_floppy(struct drive_s *drive_g);
 int find_floppy_type(u32 size);
 int process_floppy_op(struct disk_op_s *op);
-void floppy_tick();
+void floppy_tick(void);
 
 // cdrom.c
 extern struct drive_s *cdemu_drive;
 int process_cdemu_op(struct disk_op_s *op);
-void cdemu_setup();
+void cdemu_setup(void);
 void cdemu_134b(struct bregs *regs);
 int cdrom_boot(int cdid);
 
 // ramdisk.c
 void describe_ramdisk(struct drive_s *drive_g);
-void ramdisk_setup();
+void ramdisk_setup(void);
 int process_ramdisk_op(struct disk_op_s *op);
 
 #endif // disk.h
diff --git a/src/farptr.h b/src/farptr.h
index 0bd9248..3dbf545 100644
--- a/src/farptr.h
+++ b/src/farptr.h
@@ -50,7 +50,7 @@
 
 // Macros for automatically choosing the appropriate memory size
 // access method.
-extern void __force_link_error__unknown_type();
+extern void __force_link_error__unknown_type(void);
 
 #define __GET_VAR(prefix, seg, var) ({          \
     typeof(var) __val;                          \
diff --git a/src/floppy.c b/src/floppy.c
index a8e2ac9..a7bd0dd 100644
--- a/src/floppy.c
+++ b/src/floppy.c
@@ -119,7 +119,7 @@
 }
 
 void
-floppy_setup()
+floppy_setup(void)
 {
     if (! CONFIG_FLOPPY)
         return;
@@ -159,7 +159,7 @@
  ****************************************************************/
 
 static void
-floppy_reset_controller()
+floppy_reset_controller(void)
 {
     // Reset controller
     u8 val8 = inb(PORT_FD_DOR);
@@ -172,7 +172,7 @@
 }
 
 static int
-wait_floppy_irq()
+wait_floppy_irq(void)
 {
     ASSERT16();
     u8 v;
@@ -570,7 +570,7 @@
 
 // INT 0Eh Diskette Hardware ISR Entry Point
 void VISIBLE16
-handle_0e()
+handle_0e(void)
 {
     debug_isr(DEBUG_ISR_0e);
     if (! CONFIG_FLOPPY)
@@ -593,7 +593,7 @@
 
 // Called from int08 handler.
 void
-floppy_tick()
+floppy_tick(void)
 {
     if (! CONFIG_FLOPPY)
         return;
diff --git a/src/kbd.c b/src/kbd.c
index 39294a7..6f3ae15 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -34,7 +34,7 @@
 #define KF2_101KBD     (1<<4)
 
 void
-kbd_setup()
+kbd_setup(void)
 {
     dprintf(3, "init keyboard\n");
     u16 x = offsetof(struct bios_data_area_s, kbd_buf);
@@ -220,7 +220,7 @@
 }
 
 static void
-set_leds()
+set_leds(void)
 {
     u8 shift_flags = (GET_BDA(kbd_flag0) >> 4) & 0x07;
     u8 kbd_led = GET_BDA(kbd_led);
diff --git a/src/memmap.c b/src/memmap.c
index 45f5012..aa69503 100644
--- a/src/memmap.c
+++ b/src/memmap.c
@@ -42,7 +42,7 @@
 
 // Show the current e820_list.
 static void
-dump_map()
+dump_map(void)
 {
     dprintf(1, "e820 map has %d items:\n", e820_count);
     int i;
@@ -138,14 +138,14 @@
 
 // Prep for memmap stuff - init bios table locations.
 void
-memmap_setup()
+memmap_setup(void)
 {
     e820_count = 0;
 }
 
 // Report on final memory locations.
 void
-memmap_finalize()
+memmap_finalize(void)
 {
     dump_map();
 }
diff --git a/src/memmap.h b/src/memmap.h
index 616ae35..68eb6ac 100644
--- a/src/memmap.h
+++ b/src/memmap.h
@@ -17,8 +17,8 @@
 };
 
 void add_e820(u64 start, u64 size, u32 type);
-void memmap_setup();
-void memmap_finalize();
+void memmap_setup(void);
+void memmap_finalize(void);
 struct e820entry *find_high_area(u32 size);
 
 // A typical OS page size
diff --git a/src/misc.c b/src/misc.c
index 7d6e954..b33ef64 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -55,13 +55,13 @@
 
 // NMI handler
 void VISIBLE16
-handle_02()
+handle_02(void)
 {
     debug_isr(DEBUG_ISR_02);
 }
 
 void
-mathcp_setup()
+mathcp_setup(void)
 {
     dprintf(3, "math cp init\n");
     // 80x87 coprocessor installed
@@ -71,7 +71,7 @@
 
 // INT 75 - IRQ13 - MATH COPROCESSOR EXCEPTION
 void VISIBLE16
-handle_75()
+handle_75(void)
 {
     debug_isr(DEBUG_ISR_75);
 
diff --git a/src/mouse.c b/src/mouse.c
index ac37cc0..52e225c 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -12,7 +12,7 @@
 #include "ps2port.h" // aux_command
 
 void
-mouse_setup()
+mouse_setup(void)
 {
     if (! CONFIG_MOUSE)
         return;
diff --git a/src/optionroms.c b/src/optionroms.c
index 31bb98b..ace0c0e 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -170,7 +170,7 @@
 
 // Return the memory position up to which roms may be located.
 static inline u32
-max_rom()
+max_rom(void)
 {
     extern u8 code32flat_start[];
     if ((u32)code32flat_start > BUILD_BIOS_ADDR)
@@ -364,7 +364,7 @@
  ****************************************************************/
 
 void
-optionrom_setup()
+optionrom_setup(void)
 {
     if (! CONFIG_OPTIONROMS)
         return;
@@ -435,7 +435,7 @@
 
 // Call into vga code to turn on console.
 void
-vga_setup()
+vga_setup(void)
 {
     VGAbdf = -1;
     RomEnd = BUILD_ROM_START;
@@ -477,7 +477,7 @@
 }
 
 void
-s3_resume_vga_init()
+s3_resume_vga_init(void)
 {
     if (!CONFIG_S3_RESUME_VGA_INIT)
         return;
diff --git a/src/output.c b/src/output.c
index 2e7175e..3de565a 100644
--- a/src/output.c
+++ b/src/output.c
@@ -25,7 +25,7 @@
 #define DEBUG_TIMEOUT 100000
 
 void
-debug_serial_setup()
+debug_serial_setup(void)
 {
     if (!CONFIG_DEBUG_SERIAL)
         return;
@@ -59,7 +59,7 @@
 
 // Make sure all serial port writes have been completely sent.
 static void
-debug_serial_flush()
+debug_serial_flush(void)
 {
     if (!CONFIG_DEBUG_SERIAL)
         return;
diff --git a/src/pci.c b/src/pci.c
index 143acf6..1ab3c2c 100644
--- a/src/pci.c
+++ b/src/pci.c
@@ -104,7 +104,7 @@
 
 // Find a vga device with legacy address decoding enabled.
 int
-pci_find_vga()
+pci_find_vga(void)
 {
     int bdf = 0x0000, max = 0x0100;
     for (;;) {
diff --git a/src/pci.h b/src/pci.h
index 3c04529..eea5b09 100644
--- a/src/pci.h
+++ b/src/pci.h
@@ -30,7 +30,7 @@
 u8 pci_config_readb(u16 bdf, u32 addr);
 void pci_config_maskw(u16 bdf, u32 addr, u16 off, u16 on);
 
-int pci_find_vga();
+int pci_find_vga(void);
 int pci_find_device(u16 vendid, u16 devid);
 int pci_find_class(u16 classid);
 
@@ -41,7 +41,7 @@
          ; BDF=pci_next(BDF+1, &MAX))
 
 // pirtable.c
-void create_pirtable();
+void create_pirtable(void);
 
 
 /****************************************************************
diff --git a/src/pcibios.c b/src/pcibios.c
index 2425a65..2e44c01 100644
--- a/src/pcibios.c
+++ b/src/pcibios.c
@@ -13,8 +13,8 @@
 #include "pci_regs.h" // PCI_VENDOR_ID
 
 // romlayout.S
-extern void bios32_entry();
-extern void pcibios32_entry();
+extern void bios32_entry(void);
+extern void pcibios32_entry(void);
 
 #define RET_FUNC_NOT_SUPPORTED 0x81
 #define RET_BAD_VENDOR_ID      0x83
diff --git a/src/pic.c b/src/pic.c
index 382dcbb..f421bec 100644
--- a/src/pic.c
+++ b/src/pic.c
@@ -10,7 +10,7 @@
 #include "config.h" // CONFIG_*
 
 void
-pic_setup()
+pic_setup(void)
 {
     dprintf(3, "init pic\n");
     // Send ICW1 (select OCW1 + will send ICW4)
diff --git a/src/pic.h b/src/pic.h
index 3056676..290fcb0 100644
--- a/src/pic.h
+++ b/src/pic.h
@@ -22,14 +22,14 @@
 #define PIC2_IRQ14 (1<<6)
 
 static inline void
-eoi_pic1()
+eoi_pic1(void)
 {
     // Send eoi (select OCW2 + eoi)
     outb(0x20, PORT_PIC1_CMD);
 }
 
 static inline void
-eoi_pic2()
+eoi_pic2(void)
 {
     // Send eoi (select OCW2 + eoi)
     outb(0x20, PORT_PIC2_CMD);
@@ -61,7 +61,7 @@
 }
 
 static inline u8
-get_pic1_isr()
+get_pic1_isr(void)
 {
     // 0x0b == select OCW1 + read ISR
     outb(0x0b, PORT_PIC1_CMD);
@@ -69,7 +69,7 @@
 }
 
 static inline u8
-get_pic2_isr()
+get_pic2_isr(void)
 {
     // 0x0b == select OCW1 + read ISR
     outb(0x0b, PORT_PIC2_CMD);
@@ -98,6 +98,6 @@
         __enable_hwirq(irq, func);              \
     } while (0)
 
-void pic_setup();
+void pic_setup(void);
 
 #endif // pic.h
diff --git a/src/pirtable.c b/src/pirtable.c
index 18d3ff5..4c3f1ff 100644
--- a/src/pirtable.c
+++ b/src/pirtable.c
@@ -92,7 +92,7 @@
 #endif // CONFIG_PIRTABLE && !CONFIG_COREBOOT
 
 void
-create_pirtable()
+create_pirtable(void)
 {
     if (! CONFIG_PIRTABLE)
         return;
diff --git a/src/pmm.c b/src/pmm.c
index dab8fb3..0461e41 100644
--- a/src/pmm.c
+++ b/src/pmm.c
@@ -150,7 +150,7 @@
 
 // Report the status of all the zones.
 static void
-dumpZones()
+dumpZones(void)
 {
     int i;
     for (i=0; i<ARRAY_SIZE(Zones); i++) {
@@ -282,7 +282,7 @@
 }
 
 void
-malloc_setup()
+malloc_setup(void)
 {
     ASSERT32FLAT();
     dprintf(3, "malloc setup\n");
@@ -327,7 +327,7 @@
 }
 
 void
-malloc_finalize()
+malloc_finalize(void)
 {
     dprintf(3, "malloc finalize\n");
 
@@ -482,10 +482,10 @@
 }
 
 // romlayout.S
-extern void entry_pmm();
+extern void entry_pmm(void);
 
 void
-pmm_setup()
+pmm_setup(void)
 {
     if (! CONFIG_PMM)
         return;
@@ -498,7 +498,7 @@
 }
 
 void
-pmm_finalize()
+pmm_finalize(void)
 {
     if (! CONFIG_PMM)
         return;
diff --git a/src/pnpbios.c b/src/pnpbios.c
index 4e7abc6..b1bebc9 100644
--- a/src/pnpbios.c
+++ b/src/pnpbios.c
@@ -78,7 +78,7 @@
 }
 
 u16
-get_pnp_offset()
+get_pnp_offset(void)
 {
     if (! CONFIG_PNPBIOS)
         return (u32)pnp_string + 1 - BUILD_BIOS_ADDR;
@@ -86,11 +86,11 @@
 }
 
 // romlayout.S
-extern void entry_pnp_real();
-extern void entry_pnp_prot();
+extern void entry_pnp_real(void);
+extern void entry_pnp_prot(void);
 
 void
-pnp_setup()
+pnp_setup(void)
 {
     if (! CONFIG_PNPBIOS)
         return;
diff --git a/src/post.c b/src/post.c
index db9d8f7..2d20ffa 100644
--- a/src/post.c
+++ b/src/post.c
@@ -36,7 +36,7 @@
     } while (0)
 
 static void
-init_ivt()
+init_ivt(void)
 {
     dprintf(3, "init ivt\n");
 
@@ -78,7 +78,7 @@
 }
 
 static void
-init_bda()
+init_bda(void)
 {
     dprintf(3, "init bda\n");
 
@@ -163,7 +163,7 @@
 
 // Main setup code.
 static void
-post()
+post(void)
 {
     // Detect and init ram.
     init_ivt();
@@ -236,7 +236,7 @@
 
 // 32-bit entry point.
 void VISIBLE32FLAT
-_start()
+_start(void)
 {
     init_dma();
 
diff --git a/src/ps2port.c b/src/ps2port.c
index 150529b..fb9d24a 100644
--- a/src/ps2port.c
+++ b/src/ps2port.c
@@ -304,7 +304,7 @@
  ****************************************************************/
 
 static void
-process_ps2irq()
+process_ps2irq(void)
 {
     u8 status = inb(PORT_PS2_STATUS);
     if (!(status & I8042_STR_OBF)) {
@@ -318,7 +318,7 @@
 
 // INT74h : PS/2 mouse hardware interrupt
 void VISIBLE16
-handle_74()
+handle_74(void)
 {
     if (! CONFIG_PS2PORT)
         return;
@@ -330,7 +330,7 @@
 
 // INT09h : Keyboard Hardware Service Entry Point
 void VISIBLE16
-handle_09()
+handle_09(void)
 {
     if (! CONFIG_PS2PORT)
         return;
@@ -346,7 +346,7 @@
  ****************************************************************/
 
 static void
-keyboard_init()
+keyboard_init(void *data)
 {
     /* flush incoming keys */
     int ret = i8042_flush();
@@ -414,7 +414,7 @@
 }
 
 void
-ps2port_setup()
+ps2port_setup(void)
 {
     if (! CONFIG_PS2PORT)
         return;
diff --git a/src/ps2port.h b/src/ps2port.h
index e13f859..bc04903 100644
--- a/src/ps2port.h
+++ b/src/ps2port.h
@@ -59,6 +59,6 @@
 int i8042_command(int command, u8 *param);
 int kbd_command(int command, u8 *param);
 int aux_command(int command, u8 *param);
-void ps2port_setup();
+void ps2port_setup(void);
 
 #endif // ps2port.h
diff --git a/src/ramdisk.c b/src/ramdisk.c
index c1e0b8a..16c8b25 100644
--- a/src/ramdisk.c
+++ b/src/ramdisk.c
@@ -17,7 +17,7 @@
 }
 
 void
-ramdisk_setup()
+ramdisk_setup(void)
 {
     if (!CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
         return;
diff --git a/src/resume.c b/src/resume.c
index 59bb901..6cdfc69 100644
--- a/src/resume.c
+++ b/src/resume.c
@@ -13,7 +13,7 @@
 
 // Reset DMA controller
 void
-init_dma()
+init_dma(void)
 {
     // first reset the DMA controllers
     outb(0, PORT_DMA1_MASTER_CLEAR);
@@ -95,7 +95,7 @@
 
 #if MODESEGMENT == 0
 void VISIBLE32FLAT
-s3_resume()
+s3_resume(void)
 {
     if (!CONFIG_S3_RESUME)
         panic("S3 resume support not compiled in.\n");
diff --git a/src/serial.c b/src/serial.c
index 493d421..3f68bc4 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -57,7 +57,7 @@
 }
 
 void
-serial_setup()
+serial_setup(void)
 {
     if (! CONFIG_SERIAL)
         return;
@@ -224,7 +224,7 @@
 }
 
 void
-lpt_setup()
+lpt_setup(void)
 {
     if (! CONFIG_LPT)
         return;
diff --git a/src/shadow.c b/src/shadow.c
index 3f443ed..978424e 100644
--- a/src/shadow.c
+++ b/src/shadow.c
@@ -57,7 +57,7 @@
 
 // Make the 0xc0000-0x100000 area read/writable.
 void
-make_bios_writable()
+make_bios_writable(void)
 {
     if (CONFIG_COREBOOT)
         return;
@@ -88,7 +88,7 @@
 
 // Make the BIOS code segment area (0xf0000) read-only.
 void
-make_bios_readonly()
+make_bios_readonly(void)
 {
     if (CONFIG_COREBOOT)
         return;
diff --git a/src/smm.c b/src/smm.c
index be2291b..3f53ef9 100644
--- a/src/smm.c
+++ b/src/smm.c
@@ -73,7 +73,7 @@
 extern u8 smm_code_start, smm_code_end;
 
 void
-smm_init()
+smm_init(void)
 {
     if (CONFIG_COREBOOT)
         // SMM only supported on emulators.
diff --git a/src/smp.c b/src/smp.c
index 913d3a2..dac95bf 100644
--- a/src/smp.c
+++ b/src/smp.c
@@ -34,7 +34,7 @@
 
 u32 CountCPUs VAR16VISIBLE;
 u32 MaxCountCPUs VAR16VISIBLE;
-extern void smp_ap_boot_code();
+extern void smp_ap_boot_code(void);
 ASM16(
     "  .global smp_ap_boot_code\n"
     "smp_ap_boot_code:\n"
diff --git a/src/stacks.c b/src/stacks.c
index 0ddb9a8..a35ca3d 100644
--- a/src/stacks.c
+++ b/src/stacks.c
@@ -8,7 +8,7 @@
 #include "util.h" // dprintf
 #include "bregs.h" // CR0_PE
 
-static inline u32 getcr0() {
+static inline u32 getcr0(void) {
     u32 cr0;
     asm("movl %%cr0, %0" : "=r"(cr0));
     return cr0;
@@ -126,7 +126,7 @@
 int VAR16VISIBLE CanPreempt;
 
 void
-thread_setup()
+thread_setup(void)
 {
     MainThread.next = &MainThread;
     MainThread.stackpos = NULL;
@@ -135,7 +135,7 @@
 
 // Return the 'struct thread_info' for the currently running thread.
 struct thread_info *
-getCurThread()
+getCurThread(void)
 {
     u32 esp = getesp();
     if (esp <= BUILD_STACK_ADDR)
@@ -166,7 +166,7 @@
 
 // Briefly permit irqs to occur.
 void
-yield()
+yield(void)
 {
     if (MODESEGMENT || !CONFIG_THREADS) {
         // Just directly check irqs.
@@ -239,7 +239,7 @@
 
 // Wait for all threads (other than the main thread) to complete.
 void
-wait_threads()
+wait_threads(void)
 {
     ASSERT32FLAT();
     if (! CONFIG_THREADS)
@@ -257,7 +257,7 @@
 
 // Turn on RTC irqs and arrange for them to check the 32bit threads.
 void
-start_preempt()
+start_preempt(void)
 {
     if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS)
         return;
@@ -268,7 +268,7 @@
 
 // Turn off RTC irqs / stop checking for thread execution.
 void
-finish_preempt()
+finish_preempt(void)
 {
     if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS)
         return;
@@ -277,11 +277,11 @@
     dprintf(1, "Done preempt - %d checks\n", PreemptCount);
 }
 
-extern void yield_preempt();
+extern void yield_preempt(void);
 #if MODESEGMENT == 0
 // Try to execute 32bit threads.
 void VISIBLE32FLAT
-yield_preempt()
+yield_preempt(void)
 {
     PreemptCount++;
     switch_next(&MainThread);
@@ -290,7 +290,7 @@
 
 // 16bit code that checks if threads are pending and executes them if so.
 void
-check_preempt()
+check_preempt(void)
 {
     if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS
         || !GET_GLOBAL(CanPreempt)
diff --git a/src/types.h b/src/types.h
index 59999c5..7b87b86 100644
--- a/src/types.h
+++ b/src/types.h
@@ -34,9 +34,9 @@
 #define UNIQSEC __FILE__ "." __stringify(__LINE__)
 
 #define __noreturn __attribute__((noreturn))
-extern void __force_link_error__only_in_32bit_flat() __noreturn;
-extern void __force_link_error__only_in_32bit_segmented() __noreturn;
-extern void __force_link_error__only_in_16bit() __noreturn;
+extern void __force_link_error__only_in_32bit_flat(void) __noreturn;
+extern void __force_link_error__only_in_32bit_segmented(void) __noreturn;
+extern void __force_link_error__only_in_16bit(void) __noreturn;
 
 #define __ASM(code) asm(".section .text.asm." UNIQSEC "\n\t" code)
 
diff --git a/src/usb-hid.c b/src/usb-hid.c
index 8cb501a..7756c62 100644
--- a/src/usb-hid.c
+++ b/src/usb-hid.c
@@ -88,7 +88,7 @@
 }
 
 void
-usb_keyboard_setup()
+usb_keyboard_setup(void)
 {
     if (! CONFIG_USB_KEYBOARD)
         return;
@@ -168,7 +168,7 @@
 }
 
 void
-usb_check_key()
+usb_check_key(void)
 {
     if (! CONFIG_USB_KEYBOARD)
         return;
diff --git a/src/usb-hid.h b/src/usb-hid.h
index 26ca91a..6dbb2ad 100644
--- a/src/usb-hid.h
+++ b/src/usb-hid.h
@@ -5,8 +5,8 @@
 struct usb_interface_descriptor;
 int usb_keyboard_init(u32 endp, struct usb_interface_descriptor *iface
                       , int imax);
-void usb_keyboard_setup();
-void usb_check_key();
+void usb_keyboard_setup(void);
+void usb_check_key(void);
 
 
 /****************************************************************
diff --git a/src/usb.c b/src/usb.c
index fcc404b..2bd5832 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -195,7 +195,7 @@
 }
 
 void
-usb_setup()
+usb_setup(void)
 {
     if (! CONFIG_USB)
         return;
diff --git a/src/usb.h b/src/usb.h
index fe674c0..cc71c31 100644
--- a/src/usb.h
+++ b/src/usb.h
@@ -32,7 +32,7 @@
 #define USB_MAXADDR 127
 
 // usb.c
-void usb_setup();
+void usb_setup(void);
 int configure_usb_device(struct usb_s *cntl, int lowspeed);
 struct usb_ctrlrequest;
 int send_default_control(u32 endp, const struct usb_ctrlrequest *req
diff --git a/src/util.c b/src/util.c
index 552f944..b89a2b5 100644
--- a/src/util.c
+++ b/src/util.c
@@ -66,7 +66,7 @@
     );
 
 void
-check_irqs()
+check_irqs(void)
 {
     if (MODE16) {
         asm volatile(
@@ -288,7 +288,7 @@
 
 // See if a keystroke is pending in the keyboard buffer.
 static int
-check_for_keystroke()
+check_for_keystroke(void)
 {
     struct bregs br;
     memset(&br, 0, sizeof(br));
@@ -300,7 +300,7 @@
 
 // Return a keystroke - waiting forever if necessary.
 static int
-get_raw_keystroke()
+get_raw_keystroke(void)
 {
     struct bregs br;
     memset(&br, 0, sizeof(br));
diff --git a/src/util.h b/src/util.h
index 50cb336..60a7259 100644
--- a/src/util.h
+++ b/src/util.h
@@ -101,7 +101,7 @@
     return word;
 }
 
-static inline u32 getesp() {
+static inline u32 getesp(void) {
     u32 esp;
     asm("movl %%esp, %0" : "=rm"(esp));
     return esp;
@@ -164,7 +164,7 @@
         extern void irq_trampoline_ ##nr ();                    \
         __call16_int((callregs), (u32)&irq_trampoline_ ##nr );  \
     } while (0)
-void check_irqs();
+void check_irqs(void);
 u8 checksum_far(u16 buf_seg, void *buf_far, u32 len);
 u8 checksum(void *buf, u32 len);
 size_t strlen(const char *s);
@@ -188,17 +188,17 @@
 // stacks.c
 inline u32 stack_hop(u32 eax, u32 edx, u32 ecx, void *func);
 extern struct thread_info MainThread;
-void thread_setup();
-struct thread_info *getCurThread();
-void yield();
+void thread_setup(void);
+struct thread_info *getCurThread(void);
+void yield(void);
 void run_thread(void (*func)(void*), void *data);
-void wait_threads();
-void start_preempt();
-void finish_preempt();
-void check_preempt();
+void wait_threads(void);
+void start_preempt(void);
+void finish_preempt(void);
+void check_preempt(void);
 
 // output.c
-void debug_serial_setup();
+void debug_serial_setup(void);
 void panic(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2))) __noreturn;
 void printf(const char *fmt, ...)
@@ -227,28 +227,28 @@
 void hexdump(const void *d, int len);
 
 // kbd.c
-void kbd_setup();
+void kbd_setup(void);
 void handle_15c2(struct bregs *regs);
 void process_key(u8 key);
 
 // mouse.c
-void mouse_setup();
+void mouse_setup(void);
 void process_mouse(u8 data);
 
 // system.c
 extern u32 RamSize;
 extern u64 RamSizeOver4G;
-void mathcp_setup();
+void mathcp_setup(void);
 
 // serial.c
-void serial_setup();
-void lpt_setup();
+void serial_setup(void);
+void lpt_setup(void);
 
 // clock.c
 static inline int check_time(u64 end) {
     return (s64)(rdtscll() - end) > 0;
 }
-void timer_setup();
+void timer_setup(void);
 void ndelay(u32 count);
 void udelay(u32 count);
 void mdelay(u32 count);
@@ -259,8 +259,8 @@
 u64 calc_future_tsc_usec(u32 usecs);
 void handle_1583(struct bregs *regs);
 void handle_1586(struct bregs *regs);
-void useRTC();
-void releaseRTC();
+void useRTC(void);
+void releaseRTC(void);
 
 // apm.c
 void handle_1553(struct bregs *regs);
@@ -270,14 +270,14 @@
 void bios32_setup(void);
 
 // shadow.c
-void make_bios_writable();
-void make_bios_readonly();
+void make_bios_writable(void);
+void make_bios_readonly(void);
 
 // pciinit.c
 void pci_setup(void);
 
 // smm.c
-void smm_init();
+void smm_init(void);
 
 // smp.c
 extern u32 CountCPUs;
@@ -295,37 +295,37 @@
 int cbfs_copy_optionrom(void *dst, u32 maxlen, u32 vendev);
 void cbfs_run_payload(struct cbfs_file *file);
 
-void coreboot_copy_biostable();
-void coreboot_setup();
+void coreboot_copy_biostable(void);
+void coreboot_setup(void);
 
 // vgahooks.c
 extern int VGAbdf;
-void handle_155f();
+void handle_155f(struct bregs *regs);
 void vgahook_setup(const char *vendor, const char *part);
 
 // optionroms.c
 void call_bcv(u16 seg, u16 ip);
-void optionrom_setup();
-void vga_setup();
-void s3_resume_vga_init();
+void optionrom_setup(void);
+void vga_setup(void);
+void s3_resume_vga_init(void);
 extern u32 RomEnd;
 
 // resume.c
-void init_dma();
+void init_dma(void);
 
 // pnpbios.c
 #define PNP_SIGNATURE 0x506e5024 // $PnP
-u16 get_pnp_offset();
-void pnp_setup();
+u16 get_pnp_offset(void);
+void pnp_setup(void);
 
 // pmm.c
 extern struct zone_s ZoneLow, ZoneHigh, ZoneFSeg, ZoneTmpLow, ZoneTmpHigh;
-void malloc_setup();
-void malloc_finalize();
+void malloc_setup(void);
+void malloc_finalize(void);
 void *pmm_malloc(struct zone_s *zone, u32 handle, u32 size, u32 align);
 int pmm_free(void *data);
-void pmm_setup();
-void pmm_finalize();
+void pmm_setup(void);
+void pmm_finalize(void);
 #define PMM_DEFAULT_HANDLE 0xFFFFFFFF
 // Minimum alignment of malloc'd memory
 #define MALLOC_MIN_ALIGN 16
@@ -359,7 +359,7 @@
 void mtrr_setup(void);
 
 // romlayout.S
-void reset_vector() __noreturn;
+void reset_vector(void) __noreturn;
 
 // misc.c
 extern u8 BiosChecksum;
diff --git a/src/vgahooks.c b/src/vgahooks.c
index ef33be5..26ae156 100644
--- a/src/vgahooks.c
+++ b/src/vgahooks.c
@@ -69,7 +69,7 @@
 }
 
 static int
-getAMDRamSpeed()
+getAMDRamSpeed(void)
 {
     int bdf = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MEMCTL);
     if (bdf < 0)
diff --git a/vgasrc/clext.c b/vgasrc/clext.c
index 13e3c2b..36ccad3 100644
--- a/vgasrc/clext.c
+++ b/vgasrc/clext.c
@@ -315,7 +315,7 @@
 }
 
 static u16
-cirrus_get_crtc()
+cirrus_get_crtc(void)
 {
     if (inb(VGAREG_READ_MISC_OUTPUT) & 1)
         return VGAREG_VGA_CRTC_ADDRESS;
@@ -364,14 +364,14 @@
 }
 
 static int
-cirrus_check()
+cirrus_check(void)
 {
     outw(0x9206, VGAREG_SEQU_ADDRESS);
     return inb(VGAREG_SEQU_DATA) == 0x12;
 }
 
 void
-cirrus_init()
+cirrus_init(void)
 {
     dprintf(1, "cirrus init\n");
     if (! cirrus_check())
diff --git a/vgasrc/vga.c b/vgasrc/vga.c
index 888c711..e38298e 100644
--- a/vgasrc/vga.c
+++ b/vgasrc/vga.c
@@ -1330,7 +1330,7 @@
  ****************************************************************/
 
 static void
-init_bios_area()
+init_bios_area(void)
 {
     // init detected hardware BIOS Area
     // set 80x25 color (not clear from RBIL but usual)
diff --git a/vgasrc/vgaio.c b/vgasrc/vgaio.c
index d341b89..ffded34 100644
--- a/vgasrc/vgaio.c
+++ b/vgasrc/vgaio.c
@@ -19,14 +19,14 @@
  ****************************************************************/
 
 void
-vgahw_screen_disable()
+vgahw_screen_disable(void)
 {
     inb(VGAREG_ACTL_RESET);
     outb(0x00, VGAREG_ACTL_ADDRESS);
 }
 
 void
-vgahw_screen_enable()
+vgahw_screen_enable(void)
 {
     inb(VGAREG_ACTL_RESET);
     outb(0x20, VGAREG_ACTL_ADDRESS);
@@ -65,7 +65,7 @@
 }
 
 u8
-vgahw_get_overscan_border_color()
+vgahw_get_overscan_border_color(void)
 {
     inb(VGAREG_ACTL_RESET);
     outb(0x11, VGAREG_ACTL_ADDRESS);
@@ -240,7 +240,7 @@
 }
 
 u8
-vgahw_get_pel_mask()
+vgahw_get_pel_mask(void)
 {
     return inb(VGAREG_PEL_MASK);
 }
@@ -288,7 +288,7 @@
 }
 
 void
-get_font_access()
+get_font_access(void)
 {
     outw(0x0100, VGAREG_SEQU_ADDRESS);
     outw(0x0402, VGAREG_SEQU_ADDRESS);
@@ -300,7 +300,7 @@
 }
 
 void
-release_font_access()
+release_font_access(void)
 {
     outw(0x0100, VGAREG_SEQU_ADDRESS);
     outw(0x0302, VGAREG_SEQU_ADDRESS);
@@ -318,7 +318,7 @@
  ****************************************************************/
 
 static u16
-get_crtc()
+get_crtc(void)
 {
     return GET_BDA(crtc_address);
 }
@@ -365,7 +365,7 @@
 
 // Get vertical display end
 u16
-vgahw_get_vde()
+vgahw_get_vde(void)
 {
     u16 crtc_addr = get_crtc();
     outb(0x12, crtc_addr);
@@ -545,7 +545,7 @@
 }
 
 void
-vgahw_init()
+vgahw_init(void)
 {
     // switch to color mode and enable CPU access 480 lines
     outb(0xc3, VGAREG_WRITE_MISC_OUTPUT);
diff --git a/vgasrc/vgatables.h b/vgasrc/vgatables.h
index e5f3309..1e76b3a 100644
--- a/vgasrc/vgatables.h
+++ b/vgasrc/vgatables.h
@@ -169,11 +169,11 @@
                      , u16 start, u8 destflags, u8 fontsize);
 
 // vgaio.c
-void vgahw_screen_disable();
-void vgahw_screen_enable();
+void vgahw_screen_disable(void);
+void vgahw_screen_enable(void);
 void vgahw_set_border_color(u8 color);
 void vgahw_set_overscan_border_color(u8 color);
-u8 vgahw_get_overscan_border_color();
+u8 vgahw_get_overscan_border_color(void);
 void vgahw_set_palette(u8 palid);
 void vgahw_set_single_palette_reg(u8 reg, u8 val);
 u8 vgahw_get_single_palette_reg(u8 reg);
@@ -185,33 +185,33 @@
 void vgahw_set_dac_regs(u16 seg, u8 *data_far, u8 start, int count);
 void vgahw_get_dac_regs(u16 seg, u8 *data_far, u8 start, int count);
 void vgahw_set_pel_mask(u8 val);
-u8 vgahw_get_pel_mask();
+u8 vgahw_get_pel_mask(void);
 void vgahw_save_dac_state(u16 seg, struct saveDACcolors *info);
 void vgahw_restore_dac_state(u16 seg, struct saveDACcolors *info);
 void vgahw_sequ_write(u8 index, u8 value);
 void vgahw_grdc_write(u8 index, u8 value);
 void vgahw_set_text_block_specifier(u8 spec);
-void get_font_access();
-void release_font_access();
+void get_font_access(void);
+void release_font_access(void);
 void vgahw_set_cursor_shape(u8 start, u8 end);
 void vgahw_set_active_page(u16 address);
 void vgahw_set_cursor_pos(u16 address);
 void vgahw_set_scan_lines(u8 lines);
-u16 vgahw_get_vde();
+u16 vgahw_get_vde(void);
 void vgahw_save_state(u16 seg, struct saveVideoHardware *info);
 void vgahw_restore_state(u16 seg, struct saveVideoHardware *info);
 void vgahw_set_mode(struct VideoParam_s *vparam_g);
 void vgahw_enable_video_addressing(u8 disable);
-void vgahw_init();
+void vgahw_init(void);
 
 // clext.c
 void cirrus_set_video_mode(u8 mode);
-void cirrus_init();
+void cirrus_init(void);
 
 // vbe.c -- not implemented yet.
 #define VBE_DISPI_DISABLED              0x00
 void dispi_set_enable(int enable);
-void vbe_init();
-int vbe_has_vbe_display();
+void vbe_init(void);
+int vbe_has_vbe_display(void);
 
 #endif // vgatables.h