[Spice-devel,warning,reduction,09/11] Eliminate const warnings.

Submitted by Jeremy White on Sept. 9, 2012, 11:01 p.m.

Details

Message ID 504D1FAE.9030204@codeweavers.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Jeremy White Sept. 9, 2012, 11:01 p.m.
---
 src/spiceqxl_inputs.c |   26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/spiceqxl_inputs.c b/src/spiceqxl_inputs.c
index c1f6be3..6bf3a81 100644
--- a/src/spiceqxl_inputs.c
+++ b/src/spiceqxl_inputs.c
@@ -46,9 +46,10 @@  void XSpicePointerUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
 static
 void XSpiceKeyboardUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
 
+static char xspice_pointer_name[] = "xspice pointer";
 static InputDriverRec XSPICE_POINTER = {
     1,
-    "xspice pointer",
+    xspice_pointer_name,
     NULL,
     XSpicePointerPreInit,
     XSpicePointerUnInit,
@@ -56,9 +57,10 @@  static InputDriverRec XSPICE_POINTER = {
     NULL /* defaults */
 };
 
+static char xspice_keyboard_name[] = "xspice keyboard";
 static InputDriverRec XSPICE_KEYBOARD = {
     1,
-    "xspice keyboard",
+    xspice_keyboard_name,
     NULL,
     XSpiceKeyboardPreInit,
     XSpiceKeyboardUnInit,
@@ -149,15 +151,20 @@  static void xspice_keyboard_control(DeviceIntPtr device, KeybdCtrl *ctrl)
     }
 }
 
+static char xspice_keyboard_rules[] = "evdev";
+static char xspice_keyboard_model[] = "pc105";
+static char xspice_keyboard_layout[] = "us";
+static char xspice_keyboard_variant[] = "";
+static char xspice_keyboard_options[] = "";
 static int xspice_keyboard_proc(DeviceIntPtr pDevice, int onoff)
 {
     DevicePtr pDev = (DevicePtr)pDevice;
     XkbRMLVOSet rmlvo = {
-        .rules = "evdev",
-        .model = "pc105",
-        .layout = "us",
-        .variant = "",
-        .options = "",
+        .rules = xspice_keyboard_rules,
+        .model = xspice_keyboard_model,
+        .layout = xspice_keyboard_layout,
+        .variant = xspice_keyboard_variant,
+        .options = xspice_keyboard_options,
     };
 
     switch (onoff) {
@@ -350,6 +357,7 @@  static const SpiceTabletInterface tablet_interface = {
     .buttons            = tablet_buttons,
 };
 
+static char unknown_type_string[] = "UNKNOWN";
 static int
 XSpiceKeyboardPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 {
@@ -360,7 +368,7 @@  XSpiceKeyboardPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
     kbd->pInfo = pInfo;
 
     pInfo->private = kbd;
-    pInfo->type_name = "UNKNOWN";
+    pInfo->type_name = unknown_type_string;
     pInfo->device_control = xspice_keyboard_proc;
     pInfo->read_input = NULL;
     pInfo->switch_mode = NULL;
@@ -381,7 +389,7 @@  XSpicePointerPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
     spice_pointer->pInfo = pInfo;
 
     pInfo->private = NULL;
-    pInfo->type_name = "UNKNOWN";
+    pInfo->type_name = unknown_type_string;
     pInfo->device_control = xspice_pointer_proc;
     pInfo->read_input = NULL;
     pInfo->switch_mode = NULL;