[PATCH libXaw3d 4/5] Fix incompatible vfunc pointer warnings
Yaakov (Cygwin/X)
yselkowitz at users.sourceforge.net
Wed Aug 31 19:12:15 PDT 2011
From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
AsciiSink.c:132:41: warning: initialization from incompatible pointer type
AsciiSink.c:135:41: warning: initialization from incompatible pointer type
AsciiSink.c:137:41: warning: initialization from incompatible pointer type
Vendor.c:199:24: warning: initialization from incompatible pointer type
Vendor.c:269:24: warning: initialization from incompatible pointer type
Vendor.c:284:24: warning: initialization from incompatible pointer type
Viewport.c:143:3: warning: initialization from incompatible pointer type
MultiSink.c:160:41: warning: initialization from incompatible pointer type
MultiSink.c:162:41: warning: initialization from incompatible pointer type
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
src/AsciiSink.c | 23 +++++++++++------------
src/MultiSink.c | 16 ++++++++--------
src/Vendor.c | 12 ++++++------
src/Viewport.c | 4 ++--
4 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/src/AsciiSink.c b/src/AsciiSink.c
index 7a2d9b1..5d5d959 100644
--- a/src/AsciiSink.c
+++ b/src/AsciiSink.c
@@ -69,13 +69,14 @@ static int MaxLines(Widget, Dimension);
static int MaxHeight(Widget, int);
static void SetTabs(Widget, int, short *);
-static void DisplayText(Widget, Position, Position, Boolean, XawTextPosition, XawTextPosition);
+static void DisplayText(Widget, Position, Position, XawTextPosition,
+ XawTextPosition, Boolean);
static void InsertCursor(Widget, Position, Position, XawTextInsertState);
-static void FindPosition(Widget, XawTextPosition, int, int, int,
+static void FindPosition(Widget, XawTextPosition, int, int, Boolean,
XawTextPosition *, int *, int *);
static void FindDistance(Widget, XawTextPosition, int, XawTextPosition, int *,
XawTextPosition *, int *);
-static void Resolve(Widget, XawTextPosition, int, int, XawTextPosition *, XawTextPosition *);
+static void Resolve(Widget, XawTextPosition, int, int, XawTextPosition *);
static void GetCursorBounds(Widget, XRectangle *);
#define offset(field) XtOffsetOf(AsciiSinkRec, ascii_sink.field)
@@ -246,8 +247,8 @@ PaintText(Widget w, GC gc, Position x, Position y, unsigned char * buf, int len)
*/
static void
-DisplayText(Widget w, Position x, Position y, Boolean highlight,
- XawTextPosition pos1, XawTextPosition pos2)
+DisplayText(Widget w, Position x, Position y, XawTextPosition pos1,
+ XawTextPosition pos2, Boolean highlight)
{
AsciiSinkObject sink = (AsciiSinkObject) w;
Widget source = XawTextGetSource(XtParent(w));
@@ -403,7 +404,7 @@ FindPosition(Widget w,
XawTextPosition fromPos, /* Starting position. */
int fromx, /* Horizontal location of starting position.*/
int width, /* Desired width. */
- int stopAtWordBreak, /* Whether the resulting position should
+ Boolean stopAtWordBreak, /* Whether the resulting position should
be at a word break. */
XawTextPosition *resPos, /* Resulting position. */
int *resWidth, /* Actual width used. */
@@ -455,16 +456,14 @@ FindPosition(Widget w,
}
static void
-Resolve (Widget w, XawTextPosition pos, int fromx, int width,
- XawTextPosition *leftPos, XawTextPosition *rightPos)
+Resolve (Widget w, XawTextPosition pos, int fromx, int width, XawTextPosition *resPos)
{
int resWidth, resHeight;
Widget source = XawTextGetSource(XtParent(w));
- FindPosition(w, pos, fromx, width, FALSE, leftPos, &resWidth, &resHeight);
- if (*leftPos > GETLASTPOS)
- *leftPos = GETLASTPOS;
- *rightPos = *leftPos;
+ FindPosition(w, pos, fromx, width, FALSE, resPos, &resWidth, &resHeight);
+ if (*resPos > GETLASTPOS)
+ *resPos = GETLASTPOS;
}
static void
diff --git a/src/MultiSink.c b/src/MultiSink.c
index 2e5b83b..6ac1a01 100644
--- a/src/MultiSink.c
+++ b/src/MultiSink.c
@@ -98,11 +98,11 @@ static void SetTabs(Widget, int, short *);
static void DisplayText(Widget, Position, Position, XawTextPosition,
XawTextPosition, Boolean);
static void InsertCursor(Widget, Position, Position, XawTextInsertState);
-static void FindPosition(Widget, XawTextPosition, int, int, int,
+static void FindPosition(Widget, XawTextPosition, int, int, Boolean,
XawTextPosition *, int *, int *);
static void FindDistance(Widget, XawTextPosition, int, XawTextPosition,
int *, XawTextPosition *, int *);
-static void Resolve(Widget, XawTextPosition, int, int, XawTextPosition *, XawTextPosition *);
+static void Resolve(Widget, XawTextPosition, int, int, XawTextPosition *);
static void GetCursorBounds(Widget, XRectangle *);
#define offset(field) XtOffsetOf(MultiSinkRec, multi_sink.field)
@@ -424,7 +424,8 @@ FindDistance (Widget w, XawTextPosition fromPos, int fromx, XawTextPosition toPo
static void
FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width,
- int stopAtWordBreak, XawTextPosition *resPos, int *resWidth, int *resHeight)
+ Boolean stopAtWordBreak, XawTextPosition *resPos, int *resWidth,
+ int *resHeight)
{
MultiSinkObject sink = (MultiSinkObject) w;
Widget source = XawTextGetSource(XtParent(w));
@@ -475,15 +476,14 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width,
static void
Resolve (Widget w, XawTextPosition pos, int fromx, int width,
- XawTextPosition *leftPos, XawTextPosition *rightPos)
+ XawTextPosition *resPos)
{
int resWidth, resHeight;
Widget source = XawTextGetSource(XtParent(w));
- FindPosition(w, pos, fromx, width, FALSE, leftPos, &resWidth, &resHeight);
- if (*leftPos > GETLASTPOS)
- *leftPos = GETLASTPOS;
- *rightPos = *leftPos;
+ FindPosition(w, pos, fromx, width, FALSE, resPos, &resWidth, &resHeight);
+ if (*resPos > GETLASTPOS)
+ *resPos = GETLASTPOS;
}
static void
diff --git a/src/Vendor.c b/src/Vendor.c
index 45dbb27..efa03f8 100644
--- a/src/Vendor.c
+++ b/src/Vendor.c
@@ -98,7 +98,7 @@ static XtResource resources[] = {
static void XawVendorShellClassInitialize(void);
static void XawVendorShellInitialize(Widget, Widget, ArgList, Cardinal *);
-static Boolean XawVendorShellSetValues(Widget, Widget, Widget);
+static Boolean XawVendorShellSetValues(Widget, Widget, Widget, ArgList, Cardinal *);
static void Realize(Widget, Mask *, XSetWindowAttributes *);
static void ChangeManaged(Widget);
static XtGeometryResult GeometryManager(Widget, XtWidgetGeometry *, XtWidgetGeometry *);
@@ -253,9 +253,9 @@ static XtResource ext_resources[] = {
};
static void XawVendorShellExtClassInitialize(void);
-static void XawVendorShellExtInitialize(Widget, Widget);
+static void XawVendorShellExtInitialize(Widget, Widget, ArgList, Cardinal *);
static void XawVendorShellExtDestroy(Widget);
-static Boolean XawVendorShellExtSetValues(Widget, Widget, Widget);
+static Boolean XawVendorShellExtSetValues(Widget, Widget, Widget, ArgList, Cardinal *);
externaldef(vendorshellextclassrec) XawVendorShellExtClassRec
xawvendorShellExtClassRec = {
@@ -499,7 +499,7 @@ XawVendorShellInitialize(Widget req, Widget new, ArgList args, Cardinal *num_arg
/* ARGSUSED */
static Boolean
-XawVendorShellSetValues(Widget old, Widget ref, Widget new)
+XawVendorShellSetValues(Widget old, Widget ref, Widget new, ArgList args, Cardinal *num_args)
{
return FALSE;
}
@@ -526,7 +526,7 @@ XawVendorShellExtClassInitialize(void)
/* ARGSUSED */
static void
-XawVendorShellExtInitialize(Widget req, Widget new)
+XawVendorShellExtInitialize(Widget req, Widget new, ArgList args, Cardinal *num_args)
{
_XawImInitialize(new->core.parent, new);
}
@@ -540,7 +540,7 @@ XawVendorShellExtDestroy(Widget w)
/* ARGSUSED */
static Boolean
-XawVendorShellExtSetValues(Widget old, Widget ref, Widget new)
+XawVendorShellExtSetValues(Widget old, Widget ref, Widget new, ArgList args, Cardinal *num_args)
{
return FALSE;
}
diff --git a/src/Viewport.c b/src/Viewport.c
index 26269b4..a103086 100644
--- a/src/Viewport.c
+++ b/src/Viewport.c
@@ -82,7 +82,7 @@ static void Realize(Widget, XtValueMask *, XSetWindowAttributes *);
static void Resize(Widget);
static void ChangeManaged(Widget);
static Boolean SetValues(Widget, Widget, Widget, ArgList, Cardinal *);
-static Boolean Layout(FormWidget, Dimension, Dimension);
+static Boolean Layout(FormWidget, Dimension, Dimension, Boolean);
static XtGeometryResult GeometryManager(Widget, XtWidgetGeometry *, XtWidgetGeometry *);
static XtGeometryResult PreferredGeometry(Widget, XtWidgetGeometry *, XtWidgetGeometry *);
@@ -846,7 +846,7 @@ Resize(Widget widget)
/* ARGSUSED */
static Boolean
-Layout(FormWidget w, Dimension width, Dimension height)
+Layout(FormWidget w, Dimension width, Dimension height, Boolean junk)
{
ComputeLayout( (Widget)w, /*query=*/True, /*destroy=*/True );
w->form.preferred_width = w->core.width;
--
1.7.5.1
More information about the xorg-devel
mailing list