diff options
Diffstat (limited to 'nx-X11/lib')
-rw-r--r-- | nx-X11/lib/X11/GetFPath.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/GetIFocus.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/GetKCnt.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/GetPCnt.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/GetPntMap.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/GetSSaver.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/GrServer.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/Imakefile | 4 | ||||
-rw-r--r-- | nx-X11/lib/X11/LRGB.c | 3 | ||||
-rw-r--r-- | nx-X11/lib/X11/LiHosts.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/ListExt.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/Macros.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/ModMap.c | 4 | ||||
-rw-r--r-- | nx-X11/lib/X11/Pending.c | 4 | ||||
-rw-r--r-- | nx-X11/lib/X11/QuKeybd.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/ReconfWM.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/Sync.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/UngrabSvr.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/XKBExtDev.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/XlibInt.c | 4 | ||||
-rw-r--r-- | nx-X11/lib/X11/Xlibint.h | 5 | ||||
-rw-r--r-- | nx-X11/lib/X11/cmsCmap.c | 2 | ||||
-rw-r--r-- | nx-X11/lib/X11/imLcIm.c | 7 | ||||
-rw-r--r-- | nx-X11/lib/X11/lcGeneric.c | 74 |
24 files changed, 67 insertions, 70 deletions
diff --git a/nx-X11/lib/X11/GetFPath.c b/nx-X11/lib/X11/GetFPath.c index 8c3f49c95..3d87e4f64 100644 --- a/nx-X11/lib/X11/GetFPath.c +++ b/nx-X11/lib/X11/GetFPath.c @@ -42,7 +42,7 @@ char **XGetFontPath( int count = 0; register unsigned i; register int length; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq (GetFontPath, req); diff --git a/nx-X11/lib/X11/GetIFocus.c b/nx-X11/lib/X11/GetIFocus.c index 5d43ead4f..0a7f36e8d 100644 --- a/nx-X11/lib/X11/GetIFocus.c +++ b/nx-X11/lib/X11/GetIFocus.c @@ -36,7 +36,7 @@ XGetInputFocus( int *revert_to) { xGetInputFocusReply rep; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(GetInputFocus, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); diff --git a/nx-X11/lib/X11/GetKCnt.c b/nx-X11/lib/X11/GetKCnt.c index 17f487fbe..5829fbeaa 100644 --- a/nx-X11/lib/X11/GetKCnt.c +++ b/nx-X11/lib/X11/GetKCnt.c @@ -35,7 +35,7 @@ XGetKeyboardControl ( register XKeyboardState *state) { xGetKeyboardControlReply rep; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq (GetKeyboardControl, req); (void) _XReply (dpy, (xReply *) &rep, diff --git a/nx-X11/lib/X11/GetPCnt.c b/nx-X11/lib/X11/GetPCnt.c index 2c35d210c..72d9495b5 100644 --- a/nx-X11/lib/X11/GetPCnt.c +++ b/nx-X11/lib/X11/GetPCnt.c @@ -38,7 +38,7 @@ XGetPointerControl( int *threshold) { xGetPointerControlReply rep; - xReq *req; + _X_UNUSED xReq *req; LockDisplay(dpy); GetEmptyReq(GetPointerControl, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); diff --git a/nx-X11/lib/X11/GetPntMap.c b/nx-X11/lib/X11/GetPntMap.c index 29fdf21f0..07625f8a0 100644 --- a/nx-X11/lib/X11/GetPntMap.c +++ b/nx-X11/lib/X11/GetPntMap.c @@ -45,7 +45,7 @@ int XGetPointerMapping ( unsigned char mapping[256]; /* known fixed size */ unsigned long nbytes, remainder = 0; xGetPointerMappingReply rep; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(GetPointerMapping, req); diff --git a/nx-X11/lib/X11/GetSSaver.c b/nx-X11/lib/X11/GetSSaver.c index 1aba3bb74..7c2a3061a 100644 --- a/nx-X11/lib/X11/GetSSaver.c +++ b/nx-X11/lib/X11/GetSSaver.c @@ -40,7 +40,7 @@ XGetScreenSaver( { xGetScreenSaverReply rep; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(GetScreenSaver, req); diff --git a/nx-X11/lib/X11/GrServer.c b/nx-X11/lib/X11/GrServer.c index 11d21e491..c4c62bef3 100644 --- a/nx-X11/lib/X11/GrServer.c +++ b/nx-X11/lib/X11/GrServer.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. int XGrabServer (register Display *dpy) { - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(GrabServer, req); UnlockDisplay(dpy); diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index 8549f69cd..e9ee564cd 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -147,8 +147,8 @@ EXTRA_LIBRARIES = /**/ POLL_DEFINES = -DUSE_POLL #endif CONN_DEFINES = $(CONNECTION_FLAGS) - XTRANS_X_DEFINES = $(XTRANS_FAILDEFINES) - XTRANS_XIM_DEFINES = $(XTRANS_FAILDEFINES) + XTRANS_X_DEFINES = -DX11_t -DTRANS_CLIENT $(XTRANS_FAILDEFINES) + XTRANS_XIM_DEFINES = -DXIM_t -DTRANS_CLIENT $(XTRANS_FAILDEFINES) #if HasBSD44Sockets SOCK_DEFINES = -DBSD44SOCKETS #endif diff --git a/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c index 4bfa3cfb1..38cc6cfb4 100644 --- a/nx-X11/lib/X11/LRGB.c +++ b/nx-X11/lib/X11/LRGB.c @@ -795,9 +795,6 @@ LINEAR_RGB_InitSCCData( return(XcmsSuccess); -FreeBlueTblElements: - Xfree(pScreenData->pBlueTbl->pBase); - FreeBlueTbl: Xfree(pScreenData->pBlueTbl); diff --git a/nx-X11/lib/X11/LiHosts.c b/nx-X11/lib/X11/LiHosts.c index 83cf3c791..29c36ffb5 100644 --- a/nx-X11/lib/X11/LiHosts.c +++ b/nx-X11/lib/X11/LiHosts.c @@ -77,7 +77,7 @@ XHostAddress *XListHosts ( xListHostsReply reply; unsigned char *buf, *bp; register unsigned i; - register xListHostsReq *req; + _X_UNUSED register xListHostsReq *req; XServerInterpretedAddress *sip; *nhosts = 0; diff --git a/nx-X11/lib/X11/ListExt.c b/nx-X11/lib/X11/ListExt.c index 0516e4596..7fdf9932c 100644 --- a/nx-X11/lib/X11/ListExt.c +++ b/nx-X11/lib/X11/ListExt.c @@ -41,7 +41,7 @@ char **XListExtensions( int count = 0; register unsigned i; register int length; - register xReq *req; + _X_UNUSED register xReq *req; unsigned long rlen = 0; LockDisplay(dpy); diff --git a/nx-X11/lib/X11/Macros.c b/nx-X11/lib/X11/Macros.c index d5a3a0485..e29dcd4e8 100644 --- a/nx-X11/lib/X11/Macros.c +++ b/nx-X11/lib/X11/Macros.c @@ -292,7 +292,7 @@ int XAddPixel( int XNoOp (register Display *dpy) { - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(NoOperation, req); diff --git a/nx-X11/lib/X11/ModMap.c b/nx-X11/lib/X11/ModMap.c index 49a5d08e8..ca15dde25 100644 --- a/nx-X11/lib/X11/ModMap.c +++ b/nx-X11/lib/X11/ModMap.c @@ -34,7 +34,7 @@ XModifierKeymap * XGetModifierMapping(register Display *dpy) { xGetModifierMappingReply rep; - register xReq *req; + _X_UNUSED register xReq *req; unsigned long nbytes; XModifierKeymap *res; @@ -84,7 +84,7 @@ XSetModifierMapping( req->length += mapSize >> 2; req->numKeyPerModifier = modifier_map->max_keypermod; - Data(dpy, modifier_map->modifiermap, mapSize); + Data(dpy, (const char *)modifier_map->modifiermap, mapSize); (void) _XReply(dpy, (xReply *) & rep, (SIZEOF(xSetModifierMappingReply) - SIZEOF(xReply)) >> 2, xTrue); diff --git a/nx-X11/lib/X11/Pending.c b/nx-X11/lib/X11/Pending.c index dc52c81dc..d3804c629 100644 --- a/nx-X11/lib/X11/Pending.c +++ b/nx-X11/lib/X11/Pending.c @@ -41,7 +41,7 @@ int XEventsQueued ( { int ret_val; #if defined(NX_TRANS_SOCKET) && defined(NX_TRANS_TEST) - fprintf(stderr, "\nXEventsQueued: Called with a display at [%p].\n", dpy); + fprintf(stderr, "\nXEventsQueued: Called with a display at [%p].\n", (void *)dpy); #endif LockDisplay(dpy); @@ -50,7 +50,7 @@ int XEventsQueued ( else ret_val = _XEventsQueued (dpy, mode); #if defined(NX_TRANS_SOCKET) && defined(NX_TRANS_TEST) - fprintf(stderr, "\nXEventsQueued: Going to unlock the display at [%p].\n", dpy); + fprintf(stderr, "\nXEventsQueued: Going to unlock the display at [%p].\n", (void *)dpy); #endif UnlockDisplay(dpy); return ret_val; diff --git a/nx-X11/lib/X11/QuKeybd.c b/nx-X11/lib/X11/QuKeybd.c index 4b8431d50..0a2d4d0fc 100644 --- a/nx-X11/lib/X11/QuKeybd.c +++ b/nx-X11/lib/X11/QuKeybd.c @@ -39,7 +39,7 @@ XQueryKeymap( char keys[32]) { xQueryKeymapReply rep; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(QueryKeymap, req); diff --git a/nx-X11/lib/X11/ReconfWM.c b/nx-X11/lib/X11/ReconfWM.c index 8dc3534e0..b3d8624cf 100644 --- a/nx-X11/lib/X11/ReconfWM.c +++ b/nx-X11/lib/X11/ReconfWM.c @@ -105,7 +105,7 @@ Status XReconfigureWMWindow ( */ { xGetInputFocusReply rep; - register xReq *req; + _X_UNUSED register xReq *req; GetEmptyReq(GetInputFocus, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); diff --git a/nx-X11/lib/X11/Sync.c b/nx-X11/lib/X11/Sync.c index 6326de768..bc768d4f6 100644 --- a/nx-X11/lib/X11/Sync.c +++ b/nx-X11/lib/X11/Sync.c @@ -37,7 +37,7 @@ XSync ( Bool discard) { xGetInputFocusReply rep; - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(GetInputFocus, req); diff --git a/nx-X11/lib/X11/UngrabSvr.c b/nx-X11/lib/X11/UngrabSvr.c index ea0084879..20ad9aa35 100644 --- a/nx-X11/lib/X11/UngrabSvr.c +++ b/nx-X11/lib/X11/UngrabSvr.c @@ -33,7 +33,7 @@ int XUngrabServer ( register Display *dpy) { - register xReq *req; + _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(UngrabServer, req); diff --git a/nx-X11/lib/X11/XKBExtDev.c b/nx-X11/lib/X11/XKBExtDev.c index 183647fc6..cb40ecd04 100644 --- a/nx-X11/lib/X11/XKBExtDev.c +++ b/nx-X11/lib/X11/XKBExtDev.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ -extern void +void XkbNoteDeviceChanges(XkbDeviceChangesPtr old, XkbExtensionDeviceNotifyEvent *new, unsigned int wanted) diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c index d3c85a343..42b928fd5 100644 --- a/nx-X11/lib/X11/XlibInt.c +++ b/nx-X11/lib/X11/XlibInt.c @@ -874,7 +874,7 @@ void _XSeqSyncFunction( register Display *dpy) { xGetInputFocusReply rep; - register xReq *req; + _X_UNUSED register xReq *req; #ifdef NX_TRANS_SOCKET #ifdef NX_TRANS_DEBUG @@ -3743,6 +3743,8 @@ _XIOError ( dpy->flags &= ~XlibDisplayReadEvents; dpy->flags &= ~XlibDisplayWriting; dpy->flags &= ~XlibDisplayReply; + /* shut up the compiler by returning something */ + return 0; #else exit (1); #endif diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index 056b4d8f9..932ed745e 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -856,7 +856,12 @@ extern int _XError( ); extern int _XIOError( Display* /* dpy */ +#ifdef NX_TRANS_SOCKET +); +#else ) _X_NORETURN; +#endif /* NX_TRANS_SOCKET */ + extern int (*_XIOErrorFunction)( Display* /* dpy */ ); diff --git a/nx-X11/lib/X11/cmsCmap.c b/nx-X11/lib/X11/cmsCmap.c index c5401c05d..c7087ecb1 100644 --- a/nx-X11/lib/X11/cmsCmap.c +++ b/nx-X11/lib/X11/cmsCmap.c @@ -181,7 +181,7 @@ CmapRecForColormap( } { xGetInputFocusReply rep; - register xReq *req; + _X_UNUSED register xReq *req; GetEmptyReq(GetInputFocus, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); diff --git a/nx-X11/lib/X11/imLcIm.c b/nx-X11/lib/X11/imLcIm.c index 817fb2147..b3662bc96 100644 --- a/nx-X11/lib/X11/imLcIm.c +++ b/nx-X11/lib/X11/imLcIm.c @@ -510,14 +510,15 @@ _XimCreateDefaultTree( Xim im) { FILE *fp = NULL; - char *name, *tmpname = NULL, *intname; + char *name, *tmpname = NULL; char *cachename = NULL; /* Should use getpwent() instead of $HOME (cross-platform?) */ char *home = getenv("HOME"); - char *cachedir = NULL; char *tmpcachedir = NULL; int hl = home ? strlen (home) : 0; #ifdef COMPOSECACHE + char *intname; + char *cachedir = NULL; const char *encoding = nl_langinfo (CODESET); uid_t euid = geteuid (); gid_t egid = getegid (); @@ -545,9 +546,9 @@ _XimCreateDefaultTree( if (name == (char *) NULL) { tmpname = name = _XlcFileName(im->core.lcd, COMPOSE_FILE); } +#ifdef COMPOSECACHE intname = name; -#ifdef COMPOSECACHE if (getuid () == euid && getgid () == egid && euid != 0) { char *c; /* Usage: XCOMPOSECACHE=<cachedir>[=<filename>] diff --git a/nx-X11/lib/X11/lcGeneric.c b/nx-X11/lib/X11/lcGeneric.c index 1c78a95c6..58ee5d27c 100644 --- a/nx-X11/lib/X11/lcGeneric.c +++ b/nx-X11/lib/X11/lcGeneric.c @@ -1027,10 +1027,8 @@ freeByteM( } blst = codeset->byteM; for (i = 0; i < codeset->length; i++) { - if (blst[i].byteinfo) { Xfree(blst[i].byteinfo); blst[i].byteinfo = NULL; - } } Xfree(codeset->byteM); codeset->byteM = NULL; @@ -1044,20 +1042,18 @@ freeConversion( if (codeset->mbconv) { mbconv = codeset->mbconv; /* ... */ - if (mbconv->convlist) { - Xfree(mbconv->convlist); - mbconv->convlist = NULL; - } + Xfree(mbconv->convlist); + mbconv->convlist = NULL; + Xfree(mbconv); codeset->mbconv = NULL; } if (codeset->ctconv) { ctconv = codeset->ctconv; /* ... */ - if (ctconv->convlist) { - Xfree(ctconv->convlist); - ctconv->convlist = NULL; - } + Xfree(ctconv->convlist); + ctconv->convlist = NULL; + Xfree(ctconv); codeset->ctconv = NULL; } @@ -1072,14 +1068,12 @@ freeExtdSegment( return; } ctextseg = codeset->ctextseg; - if (ctextseg->name) { - Xfree(ctextseg->name); - ctextseg->name = NULL; - } - if (ctextseg->area) { - Xfree(ctextseg->area); - ctextseg->area = NULL; - } + Xfree(ctextseg->name); + ctextseg->name = NULL; + + Xfree(ctextseg->area); + ctextseg->area = NULL; + Xfree(codeset->ctextseg); codeset->ctextseg = NULL; } @@ -1093,10 +1087,10 @@ freeParseInfo( return; } parse_info = codeset->parse_info; - if (parse_info->encoding) { - Xfree(parse_info->encoding); - parse_info->encoding = NULL; - } + + Xfree(parse_info->encoding); + parse_info->encoding = NULL; + Xfree(codeset->parse_info); codeset->parse_info = NULL; } @@ -1115,10 +1109,10 @@ destroy_CodeSetList( freeConversion(codeset[i]); freeExtdSegment(codeset[i]); freeParseInfo(codeset[i]); - if (codeset[i]->charset_list) { - Xfree(codeset[i]->charset_list); - codeset[i]->charset_list = NULL; - } + + Xfree(codeset[i]->charset_list); + codeset[i]->charset_list = NULL; + Xfree(codeset[i]); codeset[i]=NULL; } Xfree(codeset); gen->codeset_list = NULL; @@ -1130,21 +1124,20 @@ destroy_SegConv( { SegConv seg = gen->segment_conv; int i; + if (gen->segment_conv_num == 0) { return; } for (i=0;i<gen->segment_conv_num;i++) { - if (seg[i].source_encoding) { + Xfree(seg[i].source_encoding); seg[i].source_encoding = NULL; - } - if (seg[i].destination_encoding) { + Xfree(seg[i].destination_encoding); seg[i].destination_encoding = NULL; - } - if (seg[i].conv) { - Xfree(seg[i].conv); seg[i].conv = NULL; - } + + Xfree(seg[i].conv); + seg[i].conv = NULL; } Xfree(seg); gen->segment_conv = NULL; } @@ -1156,14 +1149,13 @@ destroy_gen( XLCdGenericPart *gen = XLC_GENERIC_PART(lcd); destroy_SegConv(gen); destroy_CodeSetList(gen); - if (gen->mb_parse_table) { - Xfree(gen->mb_parse_table); - gen->mb_parse_table = NULL; - } - if (gen->mb_parse_list) { - Xfree(gen->mb_parse_list); - gen->mb_parse_list = NULL; - } + + Xfree(gen->mb_parse_table); + gen->mb_parse_table = NULL; + + Xfree(gen->mb_parse_list); + gen->mb_parse_list = NULL; + } /* VW/UDC end 95.01.08 */ |