Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xorg-server/dist/hw/sun Use proper ANSI offse...
details: https://anonhg.NetBSD.org/xsrc/rev/b2046ccd3f5c
branches: trunk
changeset: 10508:b2046ccd3f5c
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Jul 23 18:14:36 2020 +0000
description:
Use proper ANSI offsetof(3) to specify framebuffer offset in struct.
Fixes build error on sparc64. No binary change on sun3.
diffstat:
external/mit/xorg-server/dist/hw/sun/sunCfb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r c007f6a49d19 -r b2046ccd3f5c external/mit/xorg-server/dist/hw/sun/sunCfb.c
--- a/external/mit/xorg-server/dist/hw/sun/sunCfb.c Wed Jul 22 21:24:20 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sunCfb.c Thu Jul 23 18:14:36 2020 +0000
@@ -418,7 +418,7 @@
ret = sunInitCommon (screen, pScreen, (off_t) 0,
sunCfbScreenInit, CG2ScreenInit,
fbCreateDefColormap, CG2SaveScreen,
- (int) &((struct cg2memfb *) 0)->pixplane);
+ offsetof(struct cg2memfb, pixplane));
((CG2Ptr) sunFbs[screen].fb)->regs.ppmask.reg = 0xFF;
#ifndef LOWMEMFTPT
}
@@ -436,7 +436,7 @@
u_char mpixel[CG4_MELEN]; /* bit-per-pixel memory */
u_char epixel[CG4_MELEN]; /* enable plane */
u_char cpixel[CG4_HEIGHT][CG4_WIDTH]; /* byte-per-pixel memory */
-} *CG4Ptr;
+} *CG4Ptr, CG4Rec;
static void
CG4Switch(ScreenPtr pScreen, int select)
@@ -462,7 +462,7 @@
sunFbs[screen].EnterLeave = CG4Switch;
return sunInitCommon (screen, pScreen, (off_t) 0,
sunCfbScreenInit, CGScreenInit,
- fbCreateDefColormap, sunSaveScreen, (int) ((CG4Ptr) 0)->cpixel);
+ fbCreateDefColormap, sunSaveScreen, offsetof(CG4Rec, cpixel));
}
#ifdef FBTYPE_SUNFAST_COLOR /* { */
Home |
Main Index |
Thread Index |
Old Index