mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
xi: More warning cleanup for input
Lots more const char stuff. Remove duplicate defs of CoreKeyboardProc and CorePointerProc from test/xi2/protocol-common.c Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
@@ -351,7 +351,7 @@ DuplicateInputAttributes(InputAttributes * attrs)
|
||||
{
|
||||
InputAttributes *new_attr;
|
||||
int ntags = 0;
|
||||
char **tags, **new_tags;
|
||||
const char **tags, **new_tags;
|
||||
|
||||
if (!attrs)
|
||||
return NULL;
|
||||
@@ -403,20 +403,20 @@ DuplicateInputAttributes(InputAttributes * attrs)
|
||||
void
|
||||
FreeInputAttributes(InputAttributes * attrs)
|
||||
{
|
||||
char **tags;
|
||||
const char **tags;
|
||||
|
||||
if (!attrs)
|
||||
return;
|
||||
|
||||
free(attrs->product);
|
||||
free(attrs->vendor);
|
||||
free(attrs->device);
|
||||
free(attrs->pnp_id);
|
||||
free(attrs->usb_id);
|
||||
free((void *) attrs->product);
|
||||
free((void *) attrs->vendor);
|
||||
free((void *) attrs->device);
|
||||
free((void *) attrs->pnp_id);
|
||||
free((void *) attrs->usb_id);
|
||||
|
||||
if ((tags = attrs->tags))
|
||||
while (*tags)
|
||||
free(*tags++);
|
||||
free((void *) *tags++);
|
||||
|
||||
free(attrs->tags);
|
||||
free(attrs);
|
||||
|
||||
Reference in New Issue
Block a user