[PATCH 2/2] xf86: Mark a few driver-provided strings const.
Eric Anholt
eric at anholt.net
Sat Nov 17 13:08:12 PST 2012
This cleans up const-cast warnings in the intel driver's screen setup.
I left the chipset/board/etc. fields non-const, because I could
*possibly* imagine a driver changing those out of the screen struct at
runtime.
---
hw/xfree86/common/xf86str.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 4c2d147..288d1a5 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -315,7 +315,7 @@ struct xf86_platform_device;
typedef struct _DriverRec {
int driverVersion;
- char *driverName;
+ const char *driverName;
void (*Identify) (int flags);
Bool (*Probe) (struct _DriverRec * drv, int flags);
const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype);
@@ -671,7 +671,7 @@ typedef void xf86ModeSetProc(ScrnInfoPtr);
typedef struct _ScrnInfoRec {
int driverVersion;
- char *driverName; /* canonical name used in */
+ const char *driverName; /* canonical name used in */
/* the config file */
ScreenPtr pScreen; /* Pointer to the ScreenRec */
int scrnIndex; /* Number of this screen */
@@ -730,7 +730,7 @@ typedef struct _ScrnInfoRec {
int heightmm;
int xDpi; /* width DPI */
int yDpi; /* height DPI */
- char *name; /* Name to prefix messages */
+ const char *name; /* Name to prefix messages */
pointer driverPrivate; /* Driver private area */
DevUnion *privates; /* Other privates can hook in
* here */
--
1.7.10.4
More information about the xorg-devel
mailing list