[Spice-devel] [PATCH xf86-video-qxl v2 cleanup 3/6] xspice: cleanup: avoid const cast warnings on option initializers
Alon Levy
alevy at redhat.com
Tue Apr 24 02:21:24 PDT 2012
---
src/qxl_driver.c | 14 ++++++++++----
src/spiceqxl_inputs.c | 4 ++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index af5bfca..fcb1b6b 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -58,6 +58,12 @@ extern void compat_init_scrn(ScrnInfoPtr);
#endif
#define CHECK_POINT()
+#ifdef XSPICE
+static char str_filter[] = "filter";
+static char str_auto[] = "auto";
+static char str_auto_glz[] = "auto_glz";
+#endif
+
const OptionInfoRec DefaultOptions[] = {
{ OPTION_ENABLE_IMAGE_CACHE,
"EnableImageCache", OPTV_BOOLEAN, { 0 }, TRUE },
@@ -86,15 +92,15 @@ const OptionInfoRec DefaultOptions[] = {
{ OPTION_SPICE_X509_KEY_FILE,
"SpiceX509KeyFile", OPTV_STRING, {0}, FALSE},
{ OPTION_SPICE_STREAMING_VIDEO,
- "SpiceStreamingVideo", OPTV_STRING, {.str="filter"}, FALSE},
+ "SpiceStreamingVideo", OPTV_STRING, {.str=str_filter}, FALSE},
{ OPTION_SPICE_PLAYBACK_COMPRESSION,
"SpicePlaybackCompression", OPTV_BOOLEAN, {1}, FALSE},
{ OPTION_SPICE_ZLIB_GLZ_WAN_COMPRESSION,
- "SpiceZlibGlzWanCompression", OPTV_STRING, {.str="auto"}, FALSE},
+ "SpiceZlibGlzWanCompression", OPTV_STRING, {.str=str_auto}, FALSE},
{ OPTION_SPICE_JPEG_WAN_COMPRESSION,
- "SpiceJpegWanCompression", OPTV_STRING, {.str="auto"}, FALSE},
+ "SpiceJpegWanCompression", OPTV_STRING, {.str=str_auto}, FALSE},
{ OPTION_SPICE_IMAGE_COMPRESSION,
- "SpiceImageCompression", OPTV_STRING, {.str="auto_glz"}, FALSE},
+ "SpiceImageCompression", OPTV_STRING, {.str=str_auto_glz}, FALSE},
{ OPTION_SPICE_DISABLE_COPY_PASTE,
"SpiceDisableCopyPaste", OPTV_BOOLEAN, {0}, FALSE},
{ OPTION_SPICE_IPV4_ONLY,
diff --git a/src/spiceqxl_inputs.c b/src/spiceqxl_inputs.c
index 5cfa823..99f1e0c 100644
--- a/src/spiceqxl_inputs.c
+++ b/src/spiceqxl_inputs.c
@@ -389,8 +389,8 @@ XSpiceKeyboardUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
void xspice_add_input_drivers(pointer module)
{
- char xspice_pointer[] = "xspice pointer";
- char xspice_keyboard[] = "xspice keyboard";
+ static char xspice_pointer[] = "xspice pointer";
+ static char xspice_keyboard[] = "xspice keyboard";
InputDriverRec XSPICE_POINTER = {
1,
--
1.7.10
More information about the Spice-devel
mailing list