]> git.pld-linux.org Git - packages/Xaw3d.git/blame - Xaw3d-git.patch
- rel 3; warnings/error fixes from git
[packages/Xaw3d.git] / Xaw3d-git.patch
CommitLineData
d78c7d40
AM
1commit b093ed77fbab09bd474094898719ed6346d30d45
2Author: Jeremy Huddleston <jeremyhu@apple.com>
3Date: Sun Jan 22 22:01:07 2012 -0800
4
5 Build fix for int-pointer cast errors
6
7 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
8
9diff --git a/src/XawIm.c b/src/XawIm.c
10index b01f0d0..82a94b1 100644
11--- a/src/XawIm.c
12+++ b/src/XawIm.c
13@@ -141,14 +141,14 @@ SearchVendorShell(Widget w)
14 return(NULL);
15 }
16
17-static XContext extContext = (XContext)NULL;
18+static XContext extContext = (XContext)0;
19
20 static XawVendorShellExtPart *
21 SetExtPart(VendorShellWidget w, XawVendorShellExtWidget vew)
22 {
23 contextDataRec *contextData;
24
25- if (extContext == (XContext)NULL) extContext = XUniqueContext();
26+ if (extContext == (XContext)0) extContext = XUniqueContext();
27
28 contextData = XtNew(contextDataRec);
29 contextData->parent = (Widget)w;
30@@ -252,14 +252,14 @@ ConfigureCB(Widget w, XtPointer closure, XEvent *event)
31 }
32 }
33
34-static XContext errContext = (XContext)NULL;
35+static XContext errContext = (XContext)0;
36
37 static Widget
38 SetErrCnxt(Widget w, XIM xim)
39 {
40 contextErrDataRec *contextErrData;
41
42- if (errContext == (XContext)NULL) errContext = XUniqueContext();
43+ if (errContext == (XContext)0) errContext = XUniqueContext();
44
45 contextErrData = XtNew(contextErrDataRec);
46 contextErrData->widget = w;
47@@ -1321,12 +1321,12 @@ Destroy(Widget w, XawVendorShellExtPart *ve)
48 return;
49 XtFree( (char*) ve->im.resources );
50
51- if (extContext != (XContext)NULL &&
52+ if (extContext != (XContext)0 &&
53 !XFindContext (XtDisplay (w), (Window)w,
54 extContext, (XPointer*)&contextData))
55 XtFree( (char*) contextData );
56
57- if (errContext != (XContext)NULL &&
58+ if (errContext != (XContext)0 &&
59 !XFindContext (XDisplayOfIM( ve->im.xim ), (Window) ve->im.xim,
60 errContext, (XPointer*) &contextErrData))
61 XtFree( (char*) contextErrData );
62
63commit 702e4ff9f5fbfae4aecba09f8c735dc97bac1b59
64Author: Jeremy Huddleston <jeremyhu@apple.com>
65Date: Sun Jan 22 11:58:09 2012 -0800
66
67 Cleanup shadow declarations
68
69 Box.c:265:10: warning: declaration shadows a local variable [-Wshadow]
70 int i = bbw->composite.num_children;
71 ^
72 Box.c:166:15: note: previous declaration is here
73 Cardinal i;
74 ^
75 1 warning generated.
76
77 Form.c:809:9: warning: declaration shadows a local variable [-Wshadow]
78 Widget w = *childP;
79 ^
80 Form.c:793:24: note: previous declaration is here
81 XawFormDoLayout(Widget w,
82 ^
83 1 warning generated.
84
85 Viewport.c:627:24: warning: declaration shadows a local variable [-Wshadow]
86 if (!needshoriz) CheckHoriz();
87 ^
88 Viewport.c:605:14: note: expanded from macro 'CheckHoriz'
89 Widget bar = w->viewport.horiz_bar; \
90 ^
91 Viewport.c:620:14: note: previous declaration is here
92 Widget bar = w->viewport.vert_bar;
93 ^
94 1 warning generated.
95
96 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
97
98diff --git a/src/Box.c b/src/Box.c
99index ccd52fd..43be5dc 100644
100--- a/src/Box.c
101+++ b/src/Box.c
102@@ -262,9 +262,9 @@ DoLayout(BoxWidget bbw, Dimension width, Dimension height,
103 if (bbw->composite.num_children == num_mapped_children)
104 XMapSubwindows( XtDisplay((Widget)bbw), XtWindow((Widget)bbw) );
105 else {
106- int i = bbw->composite.num_children;
107+ int j = bbw->composite.num_children;
108 Widget *childP = bbw->composite.children;
109- for (; i > 0; childP++, i--)
110+ for (; j > 0; childP++, j--)
111 if (XtIsRealized(*childP) && XtIsManaged(*childP) &&
112 (*childP)->core.mapped_when_managed)
113 XtMapWidget(*childP);
114diff --git a/src/Form.c b/src/Form.c
115index 49fceb6..f078270 100644
116--- a/src/Form.c
117+++ b/src/Form.c
118@@ -790,7 +790,7 @@ PreferredGeometry(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *re
119 */
120
121 void
122-XawFormDoLayout(Widget w,
123+XawFormDoLayout(Widget _fw,
124 #if NeedWidePrototypes
125 int doit)
126 #else
127@@ -798,11 +798,11 @@ XawFormDoLayout(Widget w,
128 #endif
129 {
130 Widget *childP;
131- FormWidget fw = (FormWidget)w;
132+ FormWidget fw = (FormWidget)_fw;
133 int num_children = fw->composite.num_children;
134 WidgetList children = fw->composite.children;
135
136- if ( ((fw->form.no_refigure = !doit) == TRUE) || !XtIsRealized(w) )
137+ if ( ((fw->form.no_refigure = !doit) == TRUE) || !XtIsRealized(_fw) )
138 return;
139
140 for (childP = children; childP - children < num_children; childP++) {
141diff --git a/src/Viewport.c b/src/Viewport.c
142index abb8961..a37a9a1 100644
143--- a/src/Viewport.c
144+++ b/src/Viewport.c
145@@ -602,12 +602,12 @@ ComputeLayout(Widget widget, Boolean query, Boolean destroy_scrollbars)
146 if (w->viewport.allowhoriz && \
147 (int)preferred.width > clip_width + 2 * sw) { \
148 if (!needshoriz) { \
149- Widget bar = w->viewport.horiz_bar; \
150+ Widget horiz_bar = w->viewport.horiz_bar; \
151 needshoriz = True; \
152- if (bar == (Widget)NULL) \
153- bar = CreateScrollbar(w, True); \
154- clip_height -= bar->core.height + \
155- bar->core.border_width + pad; \
156+ if (horiz_bar == (Widget)NULL) \
157+ horiz_bar = CreateScrollbar(w, True); \
158+ clip_height -= horiz_bar->core.height + \
159+ horiz_bar->core.border_width + pad; \
160 if (clip_height < 1) clip_height = 1; \
161 } \
162 intended.width = preferred.width; \
163@@ -617,12 +617,12 @@ ComputeLayout(Widget widget, Boolean query, Boolean destroy_scrollbars)
164 if (w->viewport.allowvert &&
165 (int)preferred.height > clip_height + 2 * sw) {
166 if (!needsvert) {
167- Widget bar = w->viewport.vert_bar;
168+ Widget vert_bar = w->viewport.vert_bar;
169 needsvert = True;
170- if (bar == (Widget)NULL)
171- bar = CreateScrollbar(w, False);
172- clip_width -= bar->core.width +
173- bar->core.border_width + pad;
174+ if (vert_bar == (Widget)NULL)
175+ vert_bar = CreateScrollbar(w, False);
176+ clip_width -= vert_bar->core.width +
177+ vert_bar->core.border_width + pad;
178 if (clip_width < 1) clip_width = 1;
179 if (!needshoriz) CheckHoriz();
180 }
181
182commit d31153b30abd26c3f65e19d126ce4a3542cf14c0
183Author: Jeremy Huddleston <jeremyhu@apple.com>
184Date: Sun Jan 22 11:55:29 2012 -0800
185
186 Include <stdlib.h> for abs()
187
188 Tip.c:336:9: error: implicit declaration of function 'abs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
189 ksy += abs(ext->max_ink_extent.y);
190 ^
191 1 error generated.
192
193 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
194
195diff --git a/src/Tip.c b/src/Tip.c
196index 6881670..5f54d14 100644
197--- a/src/Tip.c
198+++ b/src/Tip.c
199@@ -43,6 +43,8 @@
200 #include <X11/Xaw3d/TipP.h>
201 #include <X11/Xaw3d/XawInit.h>
202
203+#include <stdlib.h>
204+
205 #define TIP_EVENT_MASK (ButtonPressMask | \
206 ButtonReleaseMask | \
207 PointerMotionMask | \
This page took 0.58113 seconds and 4 git commands to generate.