[PATCH:xts 13/16] xts5: Fix missing type specifiers.

Cyril Brulebois kibi at debian.org
Wed May 25 04:00:22 PDT 2011


Switch from default int to void since those functions don't return
anything. Adapt the relevant header accordingly.

The following warnings go away accordingly:
|   CC     regid.lo
| regid.c:312:1: waning: type specifier missing, defaults to 'int' [-Wimplicit-int]
| regenable()
| ^~~~~~~~~
| regid.c:316:1: waning: type specifier missing, defaults to 'int' [-Wimplicit-int]
| regdisable()
| ^~~~~~~~~~

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 xts5/include/xtlibproto.h |    4 ++--
 xts5/src/lib/regid.c      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xts5/include/xtlibproto.h b/xts5/include/xtlibproto.h
index 8c176a7..fdfd443 100644
--- a/xts5/include/xtlibproto.h
+++ b/xts5/include/xtlibproto.h
@@ -254,8 +254,8 @@ Pixmap nondepth1pixmap( Display *disp,  Drawable d);
 void setfuncpixel(Display *disp, Drawable drw, int  *xp, int  *yp);
 void regid(Display *disp, union regtypes *id, int  type);
 void freereg(void);
-int regenable(void);
-int regdisable(void);
+void regenable(void);
+void regdisable(void);
 void openfonts(Font fonts[], int  nfonts);
 int checkfsp(XFontStruct *fsp, XFontStruct *good, char *str);
 void txtextents(XFontStruct *fsp, unsigned char *str, int  n, int  *dir, int  *ascent, int  *descent, XCharStruct *overall);
diff --git a/xts5/src/lib/regid.c b/xts5/src/lib/regid.c
index dca60e6..1b54f74 100644
--- a/xts5/src/lib/regid.c
+++ b/xts5/src/lib/regid.c
@@ -309,11 +309,11 @@ struct	regid	*rp;
  * Functions to enable and disable resource registration.  After disabling
  * it then resources can be freed explicitly.
  */
-regenable()
+void regenable()
 {
 	Regenabled = 1;
 }
-regdisable()
+void regdisable()
 {
 	Regenabled = 0;
 }
-- 
1.7.5.1



More information about the xorg-devel mailing list