diff lwlib/xlwcheckbox.c @ 4528:726060ee587c g++-warning-removal-2008-10-28

First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
author Stephen J. Turnbull <stephen@xemacs.org>
date Wed, 29 Oct 2008 04:06:33 +0900
parents fc7067b7f407
children 5460287a3327
line wrap: on
line diff
--- a/lwlib/xlwcheckbox.c	Wed Oct 29 04:02:05 2008 +0900
+++ b/lwlib/xlwcheckbox.c	Wed Oct 29 04:06:33 2008 +0900
@@ -40,6 +40,7 @@
 #include <X11/StringDefs.h>
 #include ATHENA_XawInit_h_
 #include "../src/xmu.h"
+#include "xt-wrappers.h"
 #include "xlwcheckboxP.h"
 
 
@@ -89,10 +90,12 @@
 
 
 
-#define	offset(field)	XtOffsetOf(CheckboxRec, field)
+#define	offset(field)	XtOffsetOf(CheckboxRec, checkbox.field)
+#define res(name,_class,intrepr,type,member,extrepr,value) \
+  Xt_RESOURCE (name, _class, intrepr, type, offset(member), extrepr, value)
 static	XtResource	resources[] = {
-  {XtNtristate, XtCTristate, XtRBoolean, sizeof(Boolean),
-    offset(checkbox.tristate), XtRImmediate, (XtPointer)FALSE},
+  res (XtNtristate, XtCTristate, XtRBoolean, Boolean, tristate,
+       XtRImmediate, FALSE),
 } ;
 #undef	offset
 
@@ -127,7 +130,7 @@
 CheckboxClassRec checkboxClassRec = {
   {
     (WidgetClass) SuperClass,		/* superclass		*/
-    "Checkbox",				/* class_name		*/
+    (String) "Checkbox",		/* class_name		*/
     sizeof(CheckboxRec),		/* size			*/
     CheckboxClassInit,			/* class_initialize	*/
     NULL,				/* class_part_initialize  */