mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
Merge pull request #3492 from jriwanek-forks/clang-fix
Fix build on clang
This commit is contained in:
4
.github/workflows/cmake.yml
vendored
4
.github/workflows/cmake.yml
vendored
@@ -263,7 +263,7 @@ jobs:
|
||||
build-wrapper-win-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build
|
||||
|
||||
- name: Run sonar-scanner
|
||||
# if: 0
|
||||
if: 0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
@@ -445,7 +445,7 @@ jobs:
|
||||
build-wrapper-macosx-x86 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build
|
||||
|
||||
- name: Run sonar-scanner
|
||||
# if: 0
|
||||
if: 0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
@@ -652,7 +652,7 @@ cdi_cue_get_buffer(char *str, char **line, int up)
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv)
|
||||
break;
|
||||
case 5:
|
||||
dev->readmsf = 0;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 4:
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <86box/io.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/smram.h>
|
||||
#include <86box/spd.h>
|
||||
@@ -108,7 +109,7 @@ ali1621_smram_recalc(uint8_t val, ali1621_t *dev)
|
||||
switch (val & 0x30) {
|
||||
case 0x10: /* Open. */
|
||||
access_normal = ACCESS_SMRAM_RX;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x30: /* Protect. */
|
||||
@@ -123,7 +124,7 @@ ali1621_smram_recalc(uint8_t val, ali1621_t *dev)
|
||||
switch (val & 0x30) {
|
||||
case 0x10: /* Open. */
|
||||
access_normal |= ACCESS_SMRAM_W;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x30: /* Protect. */
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
typedef struct ali6117_t {
|
||||
uint32_t local;
|
||||
@@ -233,7 +234,7 @@ ali6117_reg_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x12:
|
||||
val &= 0xf7;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/chipset.h>
|
||||
|
||||
@@ -228,7 +229,7 @@ opti283_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x14:
|
||||
reset_on_hlt = !!(val & 0x40);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x11:
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <86box/ddma.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/hdc.h>
|
||||
@@ -1474,7 +1475,7 @@ pipc_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0xd2:
|
||||
if (dev->local == VIA_PIPC_686B)
|
||||
smbus_piix4_setclock(dev->smbus, (val & 0x04) ? 65536 : 16384);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <86box/io.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/ppi.h>
|
||||
#include <86box/mem.h>
|
||||
@@ -463,7 +464,7 @@ kbc_at_poll_at(atkbc_t *dev)
|
||||
case STATE_KBC_AMI_OUT:
|
||||
if (dev->status & STAT_OFULL)
|
||||
break;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case STATE_MAIN_IBF:
|
||||
@@ -588,7 +589,7 @@ kbc_at_poll_ps2(atkbc_t *dev)
|
||||
case STATE_KBC_AMI_OUT:
|
||||
if (dev->status & STAT_OFULL)
|
||||
break;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case STATE_MAIN_IBF:
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <86box/snd_speaker.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
#ifdef ENABLE_KBC_AT_DEV_LOG
|
||||
int kbc_at_dev_do_log = ENABLE_KBC_AT_DEV_LOG;
|
||||
@@ -135,7 +136,7 @@ kbc_at_dev_poll(void *priv)
|
||||
dev->port->wantcmd = 0;
|
||||
break;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case DEV_STATE_MAIN_WANT_IN:
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/serial.h>
|
||||
#include <86box/mouse.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
#define SERMOUSE_PORT 0 /* attach to Serial0 */
|
||||
@@ -507,7 +508,7 @@ sermouse_command_timer(void *priv)
|
||||
break;
|
||||
case PHASE_ACK:
|
||||
serial_write_fifo(dev->serial, 0x06);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case PHASE_BAUD_RATE:
|
||||
@@ -647,7 +648,7 @@ ltsermouse_write(UNUSED(struct serial_s *serial), void *priv, uint8_t data)
|
||||
switch (data) {
|
||||
default:
|
||||
mouse_serial_log("Serial mouse: Invalid period %02X, using 1200 bps\n", data);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x6E:
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/i2c.h>
|
||||
#include <86box/smbus.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
#ifdef ENABLE_SMBUS_ALI7101_LOG
|
||||
int smbus_ali7101_do_log = ENABLE_SMBUS_ALI7101_LOG;
|
||||
@@ -193,7 +194,7 @@ smbus_ali7101_write(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0x4: /* block R/W */
|
||||
timer_bytes++; /* count the SMBus length byte now */
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/i2c.h>
|
||||
#include <86box/smbus.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
#ifdef ENABLE_SMBUS_PIIX4_LOG
|
||||
int smbus_piix4_do_log = ENABLE_SMBUS_PIIX4_LOG;
|
||||
@@ -195,7 +196,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
timer_bytes++;
|
||||
}
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -216,7 +217,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0x5: /* block R/W */
|
||||
timer_bytes++; /* count the SMBus length byte now */
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -251,7 +252,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
|
||||
timer_bytes++;
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -338,7 +338,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv)
|
||||
esdi->command &= ~0x03;
|
||||
if (val & 0x02)
|
||||
fatal("Read with ECC\n");
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -399,7 +399,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv)
|
||||
|
||||
default:
|
||||
esdi_at_log("WD1007: bad command %02X\n", val);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0xe8: /*???*/
|
||||
|
||||
@@ -1655,7 +1655,7 @@ ide_writeb(uint16_t addr, uint8_t val, void *priv)
|
||||
disabled, the Read Multiple operation is rejected with an Aborted Com-
|
||||
mand error. */
|
||||
ide->blockcount = 0;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -1706,7 +1706,7 @@ ide_writeb(uint16_t addr, uint8_t val, void *priv)
|
||||
/* Turn on the activity indicator *here* so that it gets turned on
|
||||
less times. */
|
||||
ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ st506_callback(void *priv)
|
||||
st506_complete(dev);
|
||||
break;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -1608,7 +1608,7 @@ st506_init(const device_t *info)
|
||||
|
||||
case ST506_XT_TYPE_ST11R: /* Seagate ST-11R (RLL) */
|
||||
dev->spt = RLL_SECTORS;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ hdc_callback(void *priv)
|
||||
|
||||
case CMD_READ_VERIFY:
|
||||
no_data = 1;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -536,7 +536,7 @@ hdc_callback(void *priv)
|
||||
dev->buf_len = 512;
|
||||
|
||||
dev->state = STATE_SEND;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -646,7 +646,7 @@ do_send:
|
||||
dev->buf_len = 512;
|
||||
|
||||
dev->state = STATE_RECV;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -655,7 +655,7 @@ mo_update_request_length(mo_t *dev, int len, int block_len)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
default:
|
||||
@@ -1344,7 +1344,7 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
|
||||
mo_invalid_field(dev);
|
||||
return;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case GPCMD_SCSI_RESERVE:
|
||||
|
||||
@@ -821,7 +821,7 @@ zip_update_request_length(zip_t *dev, int len, int block_len)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -1411,7 +1411,7 @@ zip_command(scsi_common_t *sc, uint8_t *cdb)
|
||||
zip_invalid_field(dev);
|
||||
return;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case GPCMD_SCSI_RESERVE:
|
||||
@@ -1576,7 +1576,7 @@ zip_command(scsi_common_t *sc, uint8_t *cdb)
|
||||
zip_command_complete(dev);
|
||||
break;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case GPCMD_WRITE_6:
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
extern uint64_t motoron[FDD_NUM];
|
||||
@@ -916,7 +917,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
|
||||
fdc_bad_command(fdc);
|
||||
break;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x07: /*Recalibrate*/
|
||||
@@ -961,7 +962,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
|
||||
fdc_bad_command(fdc);
|
||||
break;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x10: /*Get version*/
|
||||
@@ -1085,7 +1086,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0x16: /* Verify */
|
||||
if (fdc->params[0] & 0x80)
|
||||
fdc->sc = fdc->params[7];
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x06: /* Read data */
|
||||
|
||||
@@ -1951,7 +1951,7 @@ d86f_format_track(int drive, int side, int do_write)
|
||||
if (dev->datac == 3)
|
||||
fdc_stop_id_request(d86f_fdc);
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -2296,7 +2296,7 @@ d86f_turbo_poll(int drive, int side)
|
||||
case STATE_0D_SPIN_TO_INDEX:
|
||||
dev->sector_count = 0;
|
||||
dev->datac = 5;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -2343,7 +2343,7 @@ d86f_turbo_poll(int drive, int side)
|
||||
dev->last_sector.id.r = dev->req_sector.id.r;
|
||||
dev->last_sector.id.n = dev->req_sector.id.n;
|
||||
d86f_handler[drive].set_sector(drive, side, dev->last_sector.id.c, dev->last_sector.id.h, dev->last_sector.id.r, dev->last_sector.id.n);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ extern int strnicmp(const char *s1, const char *s2, size_t n);
|
||||
# define off64_t off_t
|
||||
#endif
|
||||
|
||||
#if !defined (__APPLE__) || !defined(__clang__)
|
||||
# define FALLTHROUGH_ANNOTATION
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define UNUSED(arg) arg
|
||||
#else
|
||||
|
||||
25
src/include/86box/plat_fallthrough.h
Normal file
25
src/include/86box/plat_fallthrough.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Define the various platform support functions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Jasmine Iwanek, <jasmine@iwanek.co.uk>
|
||||
*
|
||||
* Copyright 2023 Jasmine Iwanek
|
||||
*/
|
||||
|
||||
#ifndef EMU_PLAT_FALLTHROUGH_H
|
||||
#define EMU_PLAT_FALLTHROUGH_H
|
||||
|
||||
#if !defined (__APPLE__) || !defined(__clang__)
|
||||
# define FALLTHROUGH_ANNOTATION
|
||||
#endif
|
||||
|
||||
#endif /*EMU_PLAT_FALLTHROUGH_H*/
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <86box/rom.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
static void
|
||||
@@ -123,7 +124,7 @@ elt_vid_out(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0x3d1:
|
||||
if (cga->crtcreg >= 32)
|
||||
return;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ do_fmt:
|
||||
|
||||
/* Done with this track. */
|
||||
dev->state = STATE_FDONE;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case STATE_FDONE:
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
#include <86box/net_ne2000.h>
|
||||
#include <86box/bswap.h>
|
||||
#include <86box/isapnp.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
/* ROM BIOS file paths. */
|
||||
@@ -749,7 +750,7 @@ nic_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv)
|
||||
case 0x10: /* PCI_BAR */
|
||||
val &= 0xe0; /* 0xe0 acc to RTL DS */
|
||||
val |= 0x01; /* re-enable IOIN bit */
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <86box/net_dp8390.h>
|
||||
#include <86box/net_wd8003.h>
|
||||
#include <86box/bswap.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
#include "cpu.h"
|
||||
@@ -734,7 +735,7 @@ wd_init(const device_t *info)
|
||||
/* Ethernet, MCA, 5x3 interface chip, RAM 16k */
|
||||
case WD8003EA:
|
||||
dev->board_chip = WE_ID_SOFT_CONFIG;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
/* Ethernet, MCA, no interface chip, RAM 16k */
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <86box/io.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/pci_dummy.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
typedef struct pci_dummy_t {
|
||||
@@ -210,7 +211,7 @@ pci_dummy_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x10: /* PCI_BAR */
|
||||
val &= 0xe0; /* 0xe0 acc to RTL DS */
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1462,7 +1462,7 @@ process_char(escp_t *dev, uint8_t ch)
|
||||
dev->curr_x = dev->left_margin;
|
||||
if (!dev->autofeed)
|
||||
return 1;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ process_char(prnt_t *dev, uint8_t ch)
|
||||
dev->curr_x = 0;
|
||||
if (!dev->autofeed)
|
||||
return 1;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1232,7 +1232,7 @@ BuslogicPCIWrite(UNUSED(int func), int addr, uint8_t val, void *priv)
|
||||
case 0x10:
|
||||
val &= 0xe0;
|
||||
val |= 1;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -1258,7 +1258,7 @@ BuslogicPCIWrite(UNUSED(int func), int addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x14:
|
||||
val &= 0xe0;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ scsi_cdrom_update_request_length(scsi_cdrom_t *dev, int len, int block_len)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
@@ -961,7 +961,7 @@ scsi_cdrom_command_common(scsi_cdrom_t *dev)
|
||||
scsi_cdrom_log("CD-ROM %i: Seek period: %" PRIu64 " us\n",
|
||||
dev->id, (uint64_t) period);
|
||||
dev->callback += period;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x25:
|
||||
@@ -1940,7 +1940,7 @@ begin:
|
||||
/* IMPORTANT: Convert the command to new read CD
|
||||
for pass through purposes. */
|
||||
dev->current_cdb[0] = GPCMD_READ_CD;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -597,7 +597,7 @@ scsi_disk_command(scsi_common_t *sc, uint8_t *cdb)
|
||||
scsi_disk_invalid_field(dev);
|
||||
return;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case GPCMD_SCSI_RESERVE:
|
||||
|
||||
@@ -1029,7 +1029,7 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val)
|
||||
switch (saddr) {
|
||||
case ESP_TCHI:
|
||||
dev->tchi_written = 1;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case ESP_TCLO:
|
||||
|
||||
@@ -486,7 +486,7 @@ x54x_bios_command(x54x_t *x54x, uint8_t max_id, BIOSCMD *cmd, int8_t islba)
|
||||
|
||||
default:
|
||||
x54x_log("BIOS: Unimplemented command: %02X\n", cmd->command);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x05: /* Format Track, invalid since SCSI has no tracks */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <86box/device.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/snd_ac97.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
static const struct {
|
||||
const device_t *device;
|
||||
@@ -417,7 +418,7 @@ rate: /* Writable only if VRA/VRM is set. */
|
||||
/* Get actual previous value. */
|
||||
prev = dev->vendor_reg_pages[(i << 3) | ((reg & 0x0e) >> 1)];
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/sound.h>
|
||||
#include <86box/snd_ad1848.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
#define CS4231 0x80
|
||||
#define CS4236 0x03
|
||||
@@ -241,7 +242,7 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv)
|
||||
case 10:
|
||||
if (ad1848->type < AD1848_TYPE_CS4235)
|
||||
break;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/nmi.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
enum {
|
||||
@@ -467,7 +468,7 @@ cmi8x38_sb_mixer_write(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0xf8 ... 0xff:
|
||||
if (dev->type == CMEDIA_CMI8338)
|
||||
mixer->regs[mixer->index] = val;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <86box/snd_ad1848.h>
|
||||
#include <86box/snd_opl.h>
|
||||
#include <86box/snd_sb.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
#define CRYSTAL_NOEEPROM 0x100
|
||||
@@ -299,7 +300,7 @@ cs423x_write(uint16_t addr, uint8_t val, void *priv)
|
||||
switch (val) {
|
||||
case 0x55: /* Disable PnP Key */
|
||||
dev->pnp_enable = 0;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <86box/sound.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/snd_ad1848.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
enum {
|
||||
@@ -626,7 +627,7 @@ writegus(uint16_t addr, uint8_t val, void *priv)
|
||||
else if (gus->irq != -1)
|
||||
picint(1 << gus->irq);
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x20d:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <86box/sound.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/snd_sb.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
#define ADPCM_4 1
|
||||
@@ -600,7 +601,7 @@ sb_exec_command(sb_dsp_t *dsp)
|
||||
case 0x75: /* 4-bit ADPCM output with reference */
|
||||
dsp->sbref = dsp->dma_readb(dsp->dma_priv);
|
||||
dsp->sbstep = 0;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x74: /* 4-bit ADPCM output */
|
||||
|
||||
@@ -536,7 +536,7 @@ ibm8514_accel_out_fifo(svga_t *svga, uint16_t port, uint32_t val, int len)
|
||||
case 0x92e8:
|
||||
if (len != 1)
|
||||
dev->test = val;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0xd2e8:
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/vid_ati_eeprom.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
void
|
||||
ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type)
|
||||
@@ -93,7 +94,7 @@ ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
|
||||
if (!dat)
|
||||
break;
|
||||
eeprom->state = EEPROM_OPCODE;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case EEPROM_OPCODE:
|
||||
|
||||
@@ -748,7 +748,7 @@ mach64_accel_write_fifo(mach64_t *mach64, uint32_t addr, uint8_t val)
|
||||
case 0x11e:
|
||||
case 0x11f:
|
||||
WRITE8(addr, mach64->dst_height_width, val);
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x113:
|
||||
@@ -973,7 +973,7 @@ mach64_accel_write_fifo(mach64_t *mach64, uint32_t addr, uint8_t val)
|
||||
case 0x2a4:
|
||||
case 0x2a5:
|
||||
addr += 2;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x2aa:
|
||||
@@ -990,7 +990,7 @@ mach64_accel_write_fifo(mach64_t *mach64, uint32_t addr, uint8_t val)
|
||||
case 0x2b0:
|
||||
case 0x2b1:
|
||||
addr += 2;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x2b6:
|
||||
|
||||
@@ -2838,7 +2838,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u
|
||||
case 0x92e8:
|
||||
if (len != 1)
|
||||
dev->test = val;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0xd2e8:
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
#define ET4000_TYPE_ISA 1 /* ISA ET4000AX */
|
||||
@@ -432,7 +433,7 @@ et4000_kasan_out(uint16_t addr, uint8_t val, void *priv)
|
||||
case 5:
|
||||
et4000->kasan_cfg_regs[5] = val;
|
||||
et4000->svga.ksc5601_english_font_type = 0x100 | val;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 6:
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
typedef struct ht216_t {
|
||||
@@ -320,7 +321,7 @@ ht216_out(uint16_t addr, uint8_t val, void *priv)
|
||||
svga->adv_flags &= ~FLAG_RAMDAC_SHIFT;
|
||||
if (val & 0x04)
|
||||
svga->adv_flags |= FLAG_RAMDAC_SHIFT;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
/*Bank registers*/
|
||||
|
||||
@@ -664,7 +664,7 @@ mystique_out(uint16_t addr, uint8_t val, void *priv)
|
||||
switch (addr) {
|
||||
case 0x3c8:
|
||||
mystique->xreg_idx = val;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0x3c6:
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <86box/vid_ddc.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
static int dither[4][4] = {
|
||||
{0, 4, 1, 5},
|
||||
@@ -4305,7 +4304,7 @@ s3_virge_init(const device_t *info)
|
||||
|
||||
case S3_VIRGE_GX:
|
||||
virge->virge_rev = 0x01;
|
||||
#ifndef __APPLE__
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user