From cb774d3ce21b7989b247389ff4643022a48e2bfb Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 31 Jul 2023 14:47:37 -0400 Subject: [PATCH] sonarlint vid_mda.c --- src/include/86box/vid_mda.h | 10 +++++----- src/video/vid_mda.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/include/86box/vid_mda.h b/src/include/86box/vid_mda.h index 37a4f6b21..ea98bef61 100644 --- a/src/include/86box/vid_mda.h +++ b/src/include/86box/vid_mda.h @@ -52,12 +52,12 @@ typedef struct mda_t { void mda_init(mda_t *mda); void mda_setcol(int chr, int blink, int fg, uint8_t cga_ink); -void mda_out(uint16_t addr, uint8_t val, void *p); -uint8_t mda_in(uint16_t addr, void *p); -void mda_write(uint32_t addr, uint8_t val, void *p); -uint8_t mda_read(uint32_t addr, void *p); +void mda_out(uint16_t addr, uint8_t val, void *priv); +uint8_t mda_in(uint16_t addr, void *priv); +void mda_write(uint32_t addr, uint8_t val, void *priv); +uint8_t mda_read(uint32_t addr, void *priv); void mda_recalctimings(mda_t *mda); -void mda_poll(void *p); +void mda_poll(void *priv); #ifdef EMU_DEVICE_H extern const device_t mda_device; diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index 8888208e2..f743885c5 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -75,7 +75,7 @@ mda_out(uint16_t addr, uint8_t val, void *priv) uint8_t mda_in(uint16_t addr, void *priv) { - mda_t *mda = (mda_t *) priv; + const mda_t *mda = (mda_t *) priv; switch (addr) { case 0x3b0: @@ -107,7 +107,7 @@ mda_write(uint32_t addr, uint8_t val, void *priv) uint8_t mda_read(uint32_t addr, void *priv) { - mda_t *mda = (mda_t *) priv; + const mda_t *mda = (mda_t *) priv; return mda->vram[addr & 0xfff]; }