summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
Diffstat (limited to 'xlib')
-rw-r--r--xlib/X11/Xlib.h8
-rw-r--r--xlib/xcolors.c3
-rw-r--r--xlib/xgc.c164
-rw-r--r--xlib/xutil.c4
4 files changed, 168 insertions, 11 deletions
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h
index 2db3f10..48cd28c 100644
--- a/xlib/X11/Xlib.h
+++ b/xlib/X11/Xlib.h
@@ -555,8 +555,8 @@ typedef struct _XDisplay {
* list to find the right procedure for each event might be
* expensive if many extensions are being used.
*/
- Bool (*event_vec[128])(); /* vector for wire to event */
- Status (*wire_vec[128])(); /* vector for event to wire */
+ Bool (*event_vec[128])(void); /* vector for wire to event */
+ Status (*wire_vec[128])(void); /* vector for event to wire */
KeySym lock_meaning; /* for XLookupString */
struct _XLockInfo *lock; /* multi-thread state, display lock */
struct _XInternalAsync *async_handlers; /* for internal async */
@@ -568,7 +568,7 @@ typedef struct _XDisplay {
struct _XDisplayAtoms *atoms; /* for XInternAtom */
unsigned int mode_switch; /* keyboard group modifiers */
struct _XContextDB *context_db; /* context database */
- Bool (**error_vec)(); /* vector for wire to error */
+ Bool (**error_vec)(void); /* vector for wire to error */
/*
* Xcms information
*/
@@ -581,7 +581,7 @@ typedef struct _XDisplay {
struct _XIMFilter *im_filters;
struct _XSQEvent *qfree; /* unallocated event queue elements */
unsigned long next_event_serial_num; /* inserted into next queue elt */
- int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
+ int (*savedsynchandler)(void); /* user synchandler when Xlib usurps */
} Display;
#if NeedFunctionPrototypes /* prototypes require event type definitions */
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index 31db297..f2d3d2e 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -341,6 +341,9 @@ XParseColor(
const char *spec,
XColor *colorPtr)
{
+ (void)display;
+ (void)map;
+
if (spec[0] == '#') {
char *p;
Tcl_WideInt value = parseHex64bit(++spec, &p);
diff --git a/xlib/xgc.c b/xlib/xgc.c
index aea8851..ed12f4b 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -48,7 +48,7 @@ static TkpClipMask *AllocClipMask(GC gc) {
TkpClipMask *clip_mask = (TkpClipMask*) gc->clip_mask;
if (clip_mask == NULL) {
- clip_mask = ckalloc(sizeof(TkpClipMask));
+ clip_mask = (TkpClipMask *)ckalloc(sizeof(TkpClipMask));
gc->clip_mask = (Pixmap) clip_mask;
#ifdef MAC_OSX_TK
} else if (clip_mask->type == TKP_CLIP_REGION) {
@@ -110,6 +110,7 @@ XCreateGC(
XGCValues *values)
{
GC gp;
+ (void)d;
/*
* In order to have room for a dash list, MAX_DASH_LIST_SIZE extra chars
@@ -120,7 +121,7 @@ XCreateGC(
#define MAX_DASH_LIST_SIZE 10
- gp = ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE + gcCacheSize);
+ gp = (GC)ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE + gcCacheSize);
if (!gp) {
return NULL;
}
@@ -141,11 +142,11 @@ XCreateGC(
InitField(fill_style, GCFillStyle, FillSolid);
InitField(fill_rule, GCFillRule, WindingRule);
InitField(arc_mode, GCArcMode, ArcPieSlice);
- InitField(tile, GCTile, None);
- InitField(stipple, GCStipple, None);
+ InitField(tile, GCTile, 0);
+ InitField(stipple, GCStipple, 0);
InitField(ts_x_origin, GCTileStipXOrigin, 0);
InitField(ts_y_origin, GCTileStipYOrigin, 0);
- InitField(font, GCFont, None);
+ InitField(font, GCFont, 0);
InitField(subwindow_mode, GCSubwindowMode, ClipByChildren);
InitField(graphics_exposures, GCGraphicsExposures, True);
InitField(clip_x_origin, GCClipXOrigin, 0);
@@ -265,6 +266,8 @@ int XFreeGC(
Display *d,
GC gc)
{
+ (void)d;
+
if (gc != NULL) {
FreeClipMask(gc);
TkpFreeGCCache(gc);
@@ -296,6 +299,8 @@ XSetForeground(
GC gc,
unsigned long foreground)
{
+ (void)display;
+
gc->foreground = foreground;
return Success;
}
@@ -306,6 +311,8 @@ XSetBackground(
GC gc,
unsigned long background)
{
+ (void)display;
+
gc->background = background;
return Success;
}
@@ -319,6 +326,7 @@ XSetDashes(
int n)
{
char *p = &(gc->dashes);
+ (void)display;
#ifdef TkWinDeleteBrush
TkWinDeleteBrush(gc->fgBrush);
@@ -341,6 +349,8 @@ XSetFunction(
GC gc,
int function)
{
+ (void)display;
+
gc->function = function;
return Success;
}
@@ -351,6 +361,8 @@ XSetFillRule(
GC gc,
int fill_rule)
{
+ (void)display;
+
gc->fill_rule = fill_rule;
return Success;
}
@@ -361,6 +373,8 @@ XSetFillStyle(
GC gc,
int fill_style)
{
+ (void)display;
+
gc->fill_style = fill_style;
return Success;
}
@@ -371,6 +385,8 @@ XSetTSOrigin(
GC gc,
int x, int y)
{
+ (void)display;
+
gc->ts_x_origin = x;
gc->ts_y_origin = y;
return Success;
@@ -382,6 +398,8 @@ XSetFont(
GC gc,
Font font)
{
+ (void)display;
+
gc->font = font;
return Success;
}
@@ -392,6 +410,8 @@ XSetArcMode(
GC gc,
int arc_mode)
{
+ (void)display;
+
gc->arc_mode = arc_mode;
return Success;
}
@@ -402,6 +422,8 @@ XSetStipple(
GC gc,
Pixmap stipple)
{
+ (void)display;
+
gc->stipple = stipple;
return Success;
}
@@ -415,6 +437,8 @@ XSetLineAttributes(
int cap_style,
int join_style)
{
+ (void)display;
+
gc->line_width = line_width;
gc->line_style = line_style;
gc->cap_style = cap_style;
@@ -429,6 +453,8 @@ XSetClipOrigin(
int clip_x_origin,
int clip_y_origin)
{
+ (void)display;
+
gc->clip_x_origin = clip_x_origin;
gc->clip_y_origin = clip_y_origin;
return Success;
@@ -461,6 +487,8 @@ TkSetRegion(
GC gc,
TkRegion r)
{
+ (void)display;
+
if (r == NULL) {
Tcl_Panic("must not pass NULL to TkSetRegion for compatibility with X11; use XSetClipMask instead");
} else {
@@ -481,6 +509,8 @@ XSetClipMask(
GC gc,
Pixmap pixmap)
{
+ (void)display;
+
if (pixmap == None) {
FreeClipMask(gc);
} else {
@@ -539,6 +569,7 @@ XDrawPoints(
int mode)
{
int res = Success;
+ (void)mode;
while (npoints-- > 0) {
res = XDrawLine(display, d, gc,
@@ -558,6 +589,12 @@ XDrawSegments(
XSegment *segments,
int nsegments)
{
+ (void)display;
+ (void)d;
+ (void)gc;
+ (void)segments;
+ (void)nsegments;
+
return BadDrawable;
}
#endif
@@ -568,6 +605,10 @@ XFetchBuffer(
int *nbytes_return,
int buffer)
{
+ (void)display;
+ (void)nbytes_return;
+ (void)buffer;
+
return (char *) 0;
}
@@ -577,6 +618,10 @@ XFetchName(
Window w,
char **window_name_return)
{
+ (void)display;
+ (void)w;
+ (void)window_name_return;
+
return Success;
}
@@ -586,6 +631,10 @@ XListProperties(
Window w,
int *num_prop_return)
{
+ (void)display;
+ (void)w;
+ (void)num_prop_return;
+
return (Atom *) 0;
}
@@ -594,7 +643,10 @@ XMapRaised(
Display *display,
Window w)
{
- return Success;
+ (void)display;
+ (void)w;
+
+ return Success;
}
int
@@ -608,6 +660,15 @@ XQueryTextExtents(
int *font_descent_return,
XCharStruct *overall_return)
{
+ (void)display;
+ (void)font_ID;
+ (void)string;
+ (void)nchars;
+ (void)direction_return;
+ (void)font_ascent_return;
+ (void)font_descent_return;
+ (void)overall_return;
+
return Success;
}
@@ -619,6 +680,12 @@ XReparentWindow(
int x,
int y)
{
+ (void)display;
+ (void)w;
+ (void)parent;
+ (void)x;
+ (void)y;
+
return BadWindow;
}
@@ -627,6 +694,9 @@ XUndefineCursor(
Display *display,
Window w)
{
+ (void)display;
+ (void)w;
+
return Success;
}
@@ -634,6 +704,7 @@ XVaNestedList
XVaCreateNestedList(
int unused, ...)
{
+ (void)unused;
return NULL;
}
@@ -641,6 +712,7 @@ char *
XSetICValues(
XIC xic, ...)
{
+ (void)xic;
return NULL;
}
@@ -648,6 +720,7 @@ char *
XGetICValues(
XIC xic, ...)
{
+ (void)xic;
return NULL;
}
@@ -655,6 +728,7 @@ void
XSetICFocus(
XIC xic)
{
+ (void)xic;
}
Window
@@ -672,6 +746,19 @@ XCreateWindow(
unsigned long value_mask,
XSetWindowAttributes *attributes)
{
+ (void)display;
+ (void)parent;
+ (void)x;
+ (void)y;
+ (void)width;
+ (void)height;
+ (void)border_width;
+ (void)depth;
+ (void)clazz;
+ (void)visual;
+ (void)value_mask;
+ (void)attributes;
+
return 0;
}
@@ -681,6 +768,10 @@ XPointInRegion(
int x,
int y)
{
+ (void)rgn;
+ (void)x;
+ (void)y;
+
return 0;
}
@@ -690,6 +781,10 @@ XUnionRegion(
Region srcb,
Region dr_return)
{
+ (void)srca;
+ (void)srcb;
+ (void)dr_return;
+
return 0;
}
@@ -699,6 +794,10 @@ XPolygonRegion(
int n,
int rule)
{
+ (void)pts;
+ (void)n;
+ (void)rule;
+
return 0;
}
@@ -706,6 +805,7 @@ void
XDestroyIC(
XIC ic)
{
+ (void)ic;
}
Cursor
@@ -718,6 +818,14 @@ XCreatePixmapCursor(
unsigned int x,
unsigned int y)
{
+ (void)display;
+ (void)source;
+ (void)mask;
+ (void)foreground_color;
+ (void)background_color;
+ (void)x;
+ (void)y;
+
return (Cursor) NULL;
}
@@ -731,6 +839,14 @@ XCreateGlyphCursor(
XColor _Xconst *foreground_color,
XColor _Xconst *background_color)
{
+ (void)display;
+ (void)source_font;
+ (void)mask_font;
+ (void)source_char;
+ (void)mask_char;
+ (void)foreground_color;
+ (void)background_color;
+
return 1;
}
@@ -742,6 +858,12 @@ XCreateFontSet(
int *missing_charset_count /* missing_charset_count */,
char **def_string /* def_string */
) {
+ (void)display;
+ (void)base_font_name_list;
+ (void)missing_charset_list;
+ (void)missing_charset_count;
+ (void)def_string;
+
return (XFontSet)0;
}
@@ -750,18 +872,23 @@ XFreeFontSet(
Display *display, /* display */
XFontSet fontset /* font_set */
) {
+ (void)display;
+ (void)fontset;
}
void
XFreeStringList(
char **list /* list */
) {
+ (void)list;
}
Status
XCloseIM(
XIM im /* im */
) {
+ (void)im;
+
return Success;
}
@@ -774,6 +901,13 @@ XRegisterIMInstantiateCallback(
XIDProc callback /* callback */,
XPointer client_data /* client_data */
) {
+ (void)dpy;
+ (void)rdb;
+ (void)res_name;
+ (void)res_class;
+ (void)callback;
+ (void)client_data;
+
return False;
}
@@ -786,6 +920,13 @@ XUnregisterIMInstantiateCallback(
XIDProc callback /* callback */,
XPointer client_data /* client_data */
) {
+ (void)dpy;
+ (void)rdb;
+ (void)res_name;
+ (void)res_class;
+ (void)callback;
+ (void)client_data;
+
return False;
}
@@ -793,6 +934,8 @@ char *
XSetLocaleModifiers(
const char *modifier_list /* modifier_list */
) {
+ (void)modifier_list;
+
return NULL;
}
@@ -802,6 +945,11 @@ XIM XOpenIM(
char *res_name /* res_name */,
char *res_class /* res_class */
) {
+ (void)dpy;
+ (void)rdb;
+ (void)res_name;
+ (void)res_class;
+
return NULL;
}
@@ -809,6 +957,8 @@ char *
XGetIMValues(
XIM im /* im */, ...
) {
+ (void)im;
+
return NULL;
}
@@ -816,6 +966,8 @@ char *
XSetIMValues(
XIM im /* im */, ...
) {
+ (void)im;
+
return NULL;
}
diff --git a/xlib/xutil.c b/xlib/xutil.c
index d80b742..a5f3b99 100644
--- a/xlib/xutil.c
+++ b/xlib/xutil.c
@@ -36,6 +36,8 @@ XInternAtom(
Bool only_if_exists)
{
static Atom atom = XA_LAST_PREDEFINED;
+ (void)atom_name;
+ (void)only_if_exists;
display->request++;
return ++atom;
@@ -64,7 +66,7 @@ XGetVisualInfo(
XVisualInfo *vinfo_template,
int *nitems_return)
{
- XVisualInfo *info = ckalloc(sizeof(XVisualInfo));
+ XVisualInfo *info = (XVisualInfo *)ckalloc(sizeof(XVisualInfo));
info->visual = DefaultVisual(display, 0);
info->visualid = info->visual->visualid;