diff options
-rw-r--r-- | include/X11/ConvertI.h | 2 | ||||
-rw-r--r-- | src/Alloc.c | 2 | ||||
-rw-r--r-- | src/Convert.c | 2 | ||||
-rw-r--r-- | src/Converters.c | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/include/X11/ConvertI.h b/include/X11/ConvertI.h index e7a9636..8fdfe18 100644 --- a/include/X11/ConvertI.h +++ b/include/X11/ConvertI.h @@ -74,7 +74,7 @@ extern void _XtTableAddConverter( XrmRepresentation /* from_type */, XrmRepresentation /* to_type */, XtTypeConverter /* converter */, - XtConvertArgList /* convert_args */, + XtConvertArgRec const * /* convert_args */, Cardinal /* num_args */, _XtBoolean /* new_style */, XtCacheType /* cache_type */, diff --git a/src/Alloc.c b/src/Alloc.c index dd2f616..625120d 100644 --- a/src/Alloc.c +++ b/src/Alloc.c @@ -144,7 +144,7 @@ Cardinal XtAsprintf( _XtAllocError("vsnprintf"); *new_string = XtMalloc((Cardinal) len + 1); /* snprintf doesn't count trailing '\0' */ - if (len < sizeof(buf)) + if ((size_t)len < sizeof(buf)) { strncpy(*new_string, buf, (size_t) len); (*new_string)[len] = '\0'; diff --git a/src/Convert.c b/src/Convert.c index 937a51d..7c00e30 100644 --- a/src/Convert.c +++ b/src/Convert.c @@ -188,7 +188,7 @@ void _XtTableAddConverter( XrmRepresentation from_type, XrmRepresentation to_type, XtTypeConverter converter, - XtConvertArgList convert_args, + XtConvertArgRec const *convert_args, Cardinal num_args, _XtBoolean new_style, XtCacheType cache_type, diff --git a/src/Converters.c b/src/Converters.c index 2f7211e..35bc346 100644 --- a/src/Converters.c +++ b/src/Converters.c @@ -492,7 +492,7 @@ Boolean XtCvtStringToPixel( } status = XAllocNamedColor(DisplayOfScreen(screen), colormap, - (char*)str, &screenColor, &exactColor); + (_Xconst char*)str, &screenColor, &exactColor); if (status == 0) { _Xconst _XtString msg; _Xconst _XtString type; @@ -500,7 +500,7 @@ Boolean XtCvtStringToPixel( params[0] = str; /* Server returns a specific error code but Xlib discards it. Ugh */ - if (XLookupColor(DisplayOfScreen(screen), colormap, (char*)str, + if (XLookupColor(DisplayOfScreen(screen), colormap, (_Xconst char*)str, &exactColor, &screenColor)) { type = "noColormap"; msg = "Cannot allocate colormap entry for \"%s\""; @@ -1784,12 +1784,12 @@ void _XtAddDefaultConverters( { #define Add(from, to, proc, convert_args, num_args, cache) \ _XtTableAddConverter(table, from, to, proc, \ - (XtConvertArgList) convert_args, (Cardinal)num_args, \ + (XtConvertArgRec const*) convert_args, (Cardinal)num_args, \ True, cache, (XtDestructor)NULL, True) #define Add2(from, to, proc, convert_args, num_args, cache, destructor) \ _XtTableAddConverter(table, from, to, proc, \ - (XtConvertArgList) convert_args, (Cardinal)num_args, \ + (XtConvertArgRec const *) convert_args, (Cardinal)num_args, \ True, cache, destructor, True) Add(XtQColor, XtQPixel, XtCvtColorToPixel, NULL, 0, XtCacheNone); |