On Tue, Jun 25, 2013 at 11:02:48PM +0200, Thomas Klausner wrote:
> ---
>  src/ResConfig.c | 4 ++--
>  src/TMparse.c   | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/ResConfig.c b/src/ResConfig.c
> index 152d9cf..5a7f6d2 100644
> --- a/src/ResConfig.c
> +++ b/src/ResConfig.c
> @@ -892,7 +892,7 @@ _XtResourceConfigurationEH (
>       int             actual_format;
>       unsigned long   nitems;
>       unsigned long   leftover;
> -     unsigned char   *data = NULL;
> +     char            *data = NULL;
>       unsigned long   resource_len;
>       char            *data_ptr;
>       char            *resource;
> @@ -952,7 +952,7 @@ _XtResourceConfigurationEH (
>               pd->rcm_data, 0L, 8192L,
>               TRUE, XA_STRING,
>               &actual_type, &actual_format, &nitems, &leftover,
> -             &data ) == Success && actual_type == XA_STRING
> +             (unsigned char **)&data ) == Success && actual_type == XA_STRING
>                          && actual_format == 8) {

One problem with casts is that they're telling the compiler to ignore its 
type-checking.
Casting an address like that happens to work - usually - but not always.

-- 
Thomas E. Dickey <[email protected]>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to