hw/xfree86: Make strings in DriverRec and ScrnInfoRec const
This avoids compiler warnings when initializing with string constants. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
		
							parent
							
								
									a92c6406e7
								
							
						
					
					
						commit
						6f77e2645e
					
				|  | @ -299,7 +299,7 @@ struct _DriverRec; | ||||||
| 
 | 
 | ||||||
| typedef struct { | typedef struct { | ||||||
|     int driverVersion; |     int driverVersion; | ||||||
|     char *driverName; |     const char *driverName; | ||||||
|     void (*Identify) (int flags); |     void (*Identify) (int flags); | ||||||
|     Bool (*Probe) (struct _DriverRec * drv, int flags); |     Bool (*Probe) (struct _DriverRec * drv, int flags); | ||||||
|     const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); |     const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); | ||||||
|  | @ -315,7 +315,7 @@ struct xf86_platform_device; | ||||||
| 
 | 
 | ||||||
| typedef struct _DriverRec { | typedef struct _DriverRec { | ||||||
|     int driverVersion; |     int driverVersion; | ||||||
|     char *driverName; |     const char *driverName; | ||||||
|     void (*Identify) (int flags); |     void (*Identify) (int flags); | ||||||
|     Bool (*Probe) (struct _DriverRec * drv, int flags); |     Bool (*Probe) (struct _DriverRec * drv, int flags); | ||||||
|     const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); |     const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); | ||||||
|  | @ -671,7 +671,7 @@ typedef void xf86ModeSetProc(ScrnInfoPtr); | ||||||
| 
 | 
 | ||||||
| typedef struct _ScrnInfoRec { | typedef struct _ScrnInfoRec { | ||||||
|     int driverVersion; |     int driverVersion; | ||||||
|     char *driverName;           /* canonical name used in */ |     const char *driverName;     /* canonical name used in */ | ||||||
|     /* the config file */ |     /* the config file */ | ||||||
|     ScreenPtr pScreen;          /* Pointer to the ScreenRec */ |     ScreenPtr pScreen;          /* Pointer to the ScreenRec */ | ||||||
|     int scrnIndex;              /* Number of this screen */ |     int scrnIndex;              /* Number of this screen */ | ||||||
|  | @ -730,7 +730,7 @@ typedef struct _ScrnInfoRec { | ||||||
|     int heightmm; |     int heightmm; | ||||||
|     int xDpi;                   /* width DPI */ |     int xDpi;                   /* width DPI */ | ||||||
|     int yDpi;                   /* height DPI */ |     int yDpi;                   /* height DPI */ | ||||||
|     char *name;                 /* Name to prefix messages */ |     const char *name;           /* Name to prefix messages */ | ||||||
|     pointer driverPrivate;      /* Driver private area */ |     pointer driverPrivate;      /* Driver private area */ | ||||||
|     DevUnion *privates;         /* Other privates can hook in
 |     DevUnion *privates;         /* Other privates can hook in
 | ||||||
|                                  * here */ |                                  * here */ | ||||||
|  | @ -741,9 +741,9 @@ typedef struct _ScrnInfoRec { | ||||||
| 
 | 
 | ||||||
|     /* Some of these may be moved out of here into the driver private area */ |     /* Some of these may be moved out of here into the driver private area */ | ||||||
| 
 | 
 | ||||||
|     char *chipset;              /* chipset name */ |     const char *chipset;        /* chipset name */ | ||||||
|     char *ramdac;               /* ramdac name */ |     const char *ramdac;         /* ramdac name */ | ||||||
|     char *clockchip;            /* clock name */ |     const char *clockchip;      /* clock name */ | ||||||
|     Bool progClock;             /* clock is programmable */ |     Bool progClock;             /* clock is programmable */ | ||||||
|     int numClocks;              /* number of clocks */ |     int numClocks;              /* number of clocks */ | ||||||
|     int clock[MAXCLOCKS];       /* list of clock frequencies */ |     int clock[MAXCLOCKS];       /* list of clock frequencies */ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue