On 14/02/2026 02:12, Philippe Mathieu-Daudé wrote:

macfb_sense_table[] is only read, never updated, so can be const.

Update the single call site, macfb_sense_read().

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
  hw/display/macfb.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/display/macfb.c b/hw/display/macfb.c
index 388f8de5070..57ad8ad5587 100644
--- a/hw/display/macfb.c
+++ b/hw/display/macfb.c
@@ -82,7 +82,7 @@ typedef struct MacFbSense {
      uint8_t ext_sense;
  } MacFbSense;
-static MacFbSense macfb_sense_table[] = {
+static const MacFbSense macfb_sense_table[] = {
      { MACFB_DISPLAY_APPLE_21_COLOR, 0x0, 0 },
      { MACFB_DISPLAY_APPLE_PORTRAIT, 0x1, 0 },
      { MACFB_DISPLAY_APPLE_12_RGB, 0x2, 0 },
@@ -342,7 +342,7 @@ static void macfb_invalidate_display(void *opaque)
static uint32_t macfb_sense_read(MacfbState *s)
  {
-    MacFbSense *macfb_sense;
+    const MacFbSense *macfb_sense;
      uint8_t sense;
assert(s->type < ARRAY_SIZE(macfb_sense_table));

Reviewed-by: Mark Cave-Ayland <[email protected]>


ATB,

Mark.


Reply via email to