diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-03-17 17:19:45 -0400 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-04-06 10:31:25 -0700 |
commit | cf9e8c73c4ffa671d580938c9a84d6ef0bd2710d (patch) | |
tree | 21cd4cab8b92df9f9050ea8df40d9cc35bed451d /src/Geometry.c | |
parent | fb7e899e94dd402c868e8eb59ccf32284732f6ac (diff) |
This cleans up the "easy" warning fixes which can be made using my
Regress script, comparing object-files before/after the edits:
https://invisible-island.net/ansification/index.html
https://invisible-island.net/scripts/readme.html
The changes are casts, which quiet the gcc warnings about implicit
conversion that my "gcc-normal" script would show. I avoided
reformatting the code.
The change reduces the number of gcc warnings from 769 to 163.
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Geometry.c')
-rw-r--r-- | src/Geometry.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Geometry.c b/src/Geometry.c index 8d16c63..771094b 100644 --- a/src/Geometry.c +++ b/src/Geometry.c @@ -85,7 +85,7 @@ static void ClearRectObjAreas( bw2 = old->border_width << 1; XClearArea( XtDisplay(pw), XtWindow(pw), old->x, old->y, - old->width + bw2, old->height + bw2, + (unsigned)(old->width + bw2), (unsigned)(old->height + bw2), TRUE ); bw2 = r->rectangle.border_width << 1; @@ -430,7 +430,7 @@ _XtMakeGeometryRequest ( if (XtIsWidget(request->sibling)) req.changes.sibling = XtWindow(request->sibling); else - req.changeMask &= ~(CWStackMode | CWSibling); + req.changeMask = (XtGeometryMask) (req.changeMask & (unsigned long) (~(CWStackMode | CWSibling))); } } @@ -716,8 +716,8 @@ void XtTranslateCoords( *rooty = y; for (; w != NULL && ! XtIsShell(w); w = w->core.parent) { - *rootx += w->core.x + w->core.border_width; - *rooty += w->core.y + w->core.border_width; + *rootx = (Position) (*rootx + w->core.x + w->core.border_width); + *rooty = (Position) (*rooty + w->core.y + w->core.border_width); } if (w == NULL) @@ -728,8 +728,8 @@ void XtTranslateCoords( else { Position x2, y2; _XtShellGetCoordinates( w, &x2, &y2 ); - *rootx += x2 + w->core.border_width; - *rooty += y2 + w->core.border_width; + *rootx = (Position) (*rootx + x2 + w->core.border_width); + *rooty = (Position) (*rooty + y2 + w->core.border_width); } UNLOCK_APP(app); } |