[PATCH libX11 3/4] Fixes: warning: variable 'req' set but not,used
Peter Hutterer
peter.hutterer at who-t.net
Wed Oct 19 00:15:50 UTC 2016
On Sat, Jun 04, 2016 at 05:19:59PM +0200, walter harms wrote:
> Fixes: warning: variable 'req' set but not used [-Wunused-but-set-variable]
> by marking req _X_UNUSED
> Solution was discussed on xorg-devel ML
> Peter Hutter, Alan Coopersmith
> Re: [PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign]
>
> Signed-off-by: harms wharms at bfs.de
just saw that float past. please use the standard s-o-b that everyone else
uses (as added by git commit -s). that goes for the series.
Cheers,
Peter
>
> ---
> src/GetFPath.c | 2 +-
> src/GetIFocus.c | 2 +-
> src/GetKCnt.c | 2 +-
> src/GetPCnt.c | 2 +-
> src/GetPntMap.c | 2 +-
> src/GetSSaver.c | 2 +-
> src/GrServer.c | 2 +-
> src/LiHosts.c | 2 +-
> src/ListExt.c | 2 +-
> src/Macros.c | 2 +-
> src/ModMap.c | 4 ++--
> src/QuKeybd.c | 2 +-
> src/ReconfWM.c | 2 +-
> src/Sync.c | 2 +-
> src/UngrabSvr.c | 2 +-
> src/XlibInt.c | 2 +-
> src/xcms/cmsCmap.c | 2 +-
> 17 files changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/src/GetFPath.c b/src/GetFPath.c
> index 8c3f49c..3d87e4f 100644
> --- a/src/GetFPath.c
> +++ b/src/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/src/GetIFocus.c b/src/GetIFocus.c
> index 5d43ead..0a7f36e 100644
> --- a/src/GetIFocus.c
> +++ b/src/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/src/GetKCnt.c b/src/GetKCnt.c
> index 17f487f..5829fbe 100644
> --- a/src/GetKCnt.c
> +++ b/src/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/src/GetPCnt.c b/src/GetPCnt.c
> index 2c35d21..72d9495 100644
> --- a/src/GetPCnt.c
> +++ b/src/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/src/GetPntMap.c b/src/GetPntMap.c
> index 29fdf21..07625f8 100644
> --- a/src/GetPntMap.c
> +++ b/src/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/src/GetSSaver.c b/src/GetSSaver.c
> index 1aba3bb..7c2a306 100644
> --- a/src/GetSSaver.c
> +++ b/src/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/src/GrServer.c b/src/GrServer.c
> index 11d21e4..c4c62be 100644
> --- a/src/GrServer.c
> +++ b/src/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/src/LiHosts.c b/src/LiHosts.c
> index 83cf3c7..29c36ff 100644
> --- a/src/LiHosts.c
> +++ b/src/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/src/ListExt.c b/src/ListExt.c
> index be6b989..b6677e9 100644
> --- a/src/ListExt.c
> +++ b/src/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/src/Macros.c b/src/Macros.c
> index 394a764..dcd0380 100644
> --- a/src/Macros.c
> +++ b/src/Macros.c
> @@ -283,7 +283,7 @@ int XAddPixel(
> int
> XNoOp (register Display *dpy)
> {
> - register xReq *req;
> + _X_UNUSED register xReq *req;
>
> LockDisplay(dpy);
> GetEmptyReq(NoOperation, req);
> diff --git a/src/ModMap.c b/src/ModMap.c
> index 4263a8b..eae9736 100644
> --- a/src/ModMap.c
> +++ b/src/ModMap.c
> @@ -34,12 +34,12 @@ XModifierKeymap *
> XGetModifierMapping(register Display *dpy)
> {
> xGetModifierMappingReply rep;
> - register xReq *req;
> + _X_UNUSED register xReq *req;
> unsigned long nbytes;
> XModifierKeymap *res;
>
> LockDisplay(dpy);
> - GetEmptyReq(GetModifierMapping, req); // Never used ?
> + GetEmptyReq(GetModifierMapping, req);
> (void) _XReply (dpy, (xReply *)&rep, 0, xFalse);
>
> if (rep.length < (INT_MAX >> 2)) {
> diff --git a/src/QuKeybd.c b/src/QuKeybd.c
> index 4b8431d..0a2d4d0 100644
> --- a/src/QuKeybd.c
> +++ b/src/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/src/ReconfWM.c b/src/ReconfWM.c
> index 8dc3534..b3d8624 100644
> --- a/src/ReconfWM.c
> +++ b/src/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/src/Sync.c b/src/Sync.c
> index 6326de7..bc768d4 100644
> --- a/src/Sync.c
> +++ b/src/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/src/UngrabSvr.c b/src/UngrabSvr.c
> index ea00848..20ad9aa 100644
> --- a/src/UngrabSvr.c
> +++ b/src/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/src/XlibInt.c b/src/XlibInt.c
> index 86ae1d9..78d4e5e 100644
> --- a/src/XlibInt.c
> +++ b/src/XlibInt.c
> @@ -196,7 +196,7 @@ void _XSeqSyncFunction(
> register Display *dpy)
> {
> xGetInputFocusReply rep;
> - register xReq *req;
> + _X_UNUSED register xReq *req;
>
> if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
> GetEmptyReq(GetInputFocus, req);
> diff --git a/src/xcms/cmsCmap.c b/src/xcms/cmsCmap.c
> index c5401c0..c7087ec 100644
> --- a/src/xcms/cmsCmap.c
> +++ b/src/xcms/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);
> --
> 2.1.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
>
More information about the xorg-devel
mailing list