[PATCH 1/4] Fix a couple of compiler warnings

Julien Cristau jcristau at debian.org
Sat May 8 03:57:37 PDT 2010


On Fri, May  7, 2010 at 23:19:18 -0700, Keith Packard wrote:

> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  config/udev.c             |    6 +++---
>  hw/dmx/dmxgc.c            |    2 ++
>  hw/dmx/glxProxy/glxcmds.c |    2 +-
>  3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/config/udev.c b/config/udev.c
> index 452fb5a..a56fcd6 100644
> --- a/config/udev.c
> +++ b/config/udev.c
> @@ -81,12 +81,12 @@ device_added(struct udev_device *udev_device)
>      if (!name)
>          name = "(unnamed)";
>      else
> -        attrs.product = name;
> +        attrs.product = (char *) name;
>      add_option(&options, "name", name);
>  
>      add_option(&options, "path", path);
>      add_option(&options, "device", path);
> -    attrs.device = path;
> +    attrs.device = (char *) path;
>      attrs.tags = xstrtokenize(udev_device_get_property_value(udev_device, "ID_INPUT.tags"), ",");
>  
>      config_info = Xprintf("udev:%s", syspath);
> @@ -119,7 +119,7 @@ device_added(struct udev_device *udev_device)
>              else if (!strcasecmp(tmp, "options"))
>                  add_option(&options, "xkb_options", value);
>          } else if (!strcmp(key, "ID_VENDOR")) {
> -            attrs.vendor = value;
> +            attrs.vendor = (char *) value;
>          } else if (!strcmp(key, "ID_INPUT_KEY")) {
>              attrs.flags |= ATTR_KEYBOARD;
>          } else if (!strcmp(key, "ID_INPUT_MOUSE")) {

Can we make the stuff in InputAttributes const instead?

Cheers,
Julien


More information about the xorg-devel mailing list