diff options
author | Egbert Eich <eich@suse.de> | 2004-01-29 08:08:06 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2004-01-29 08:08:06 +0000 |
commit | 0d10732a71487293bd70c2675ced6bffb6093c8d (patch) | |
tree | 3633f1f436e9791ac89e069afd90dcc216002764 | |
parent | 6b975651aef1797eb795bd876486c565c52f66fd (diff) |
Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004xf86-4_3_99_903_specialxf86-012804-2330
-rw-r--r-- | include/X11/Xmu/SysUtil.h | 9 | ||||
-rw-r--r-- | include/X11/Xmu/Xmu.h | 9 | ||||
-rw-r--r-- | src/EditresCom.c | 16 |
3 files changed, 24 insertions, 10 deletions
diff --git a/include/X11/Xmu/SysUtil.h b/include/X11/Xmu/SysUtil.h index 0f24a89..019e0ba 100644 --- a/include/X11/Xmu/SysUtil.h +++ b/include/X11/Xmu/SysUtil.h @@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.9 2001/12/14 19:55:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.10 2004/01/23 03:57:58 dawes Exp $ */ #ifndef _SYSUTIL_H_ #define _SYSUTIL_H_ @@ -47,7 +47,12 @@ int XmuSnprintf int size, _Xconst char *fmt, ... - ); + ) +#if defined(__GNUC__) && \ + ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) +__attribute((format(printf,3,4))) +#endif +; #endif _XFUNCPROTOEND diff --git a/include/X11/Xmu/Xmu.h b/include/X11/Xmu/Xmu.h index 0959249..8e0f7ff 100644 --- a/include/X11/Xmu/Xmu.h +++ b/include/X11/Xmu/Xmu.h @@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.9 2001/12/14 19:55:59 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.10 2004/01/23 03:57:58 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -116,7 +116,12 @@ XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*); #endif /* notdef */ #ifndef _SYSUTIL_H_ -int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...); +int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...) +#if defined(__GNUC__) && \ + ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) +__attribute((format(printf,3,4))) +#endif +; #endif #endif /* _XMU_H_ */ diff --git a/src/EditresCom.c b/src/EditresCom.c index 4b6a5cc..d8d1334 100644 --- a/src/EditresCom.c +++ b/src/EditresCom.c @@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.21 2003/10/24 15:44:05 tsi Exp $ */ +/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.22 2004/01/23 02:36:34 dawes Exp $ */ /* * Author: Chris D. Peterson, Dave Sternlicht, MIT X Consortium @@ -753,6 +753,7 @@ FindChildren(Widget parent, Widget **children, Bool normal, Bool popup, for (i = 0; i < num_norm; i++) if (strcmp(norm_list[i].resource_type, XtRWidget) == 0) { + widget = NULL; XtSetArg(args[0], norm_list[i].resource_name, &widget); XtGetValues(parent, args, 1); if (widget && XtParent(widget) == parent) @@ -766,6 +767,7 @@ FindChildren(Widget parent, Widget **children, Bool normal, Bool popup, for (i = 0; i < num_cons; i++) if (strcmp(cons_list[i].resource_type, XtRWidget) == 0) { + widget = NULL; XtSetArg(args[0], cons_list[i].resource_name, &widget); XtGetValues(parent, args, 1); if (widget && XtParent(widget) == parent) @@ -816,8 +818,9 @@ FindChildren(Widget parent, Widget **children, Bool normal, Bool popup, for (j = 0; j < num_extra; j++) if ((*children)[i] == extra_widgets[j]) { - memmove(&extra_widgets[j], &extra_widgets[j + 1], - (num_extra - j) * sizeof(Widget)); + if ((j + 1) < num_extra) + memmove(&extra_widgets[j], &extra_widgets[j + 1], + (num_extra - j) * sizeof(Widget)); --num_extra; } @@ -999,7 +1002,8 @@ HandleToolkitErrors(String name, String type, String class, String msg, if (streq((String)info->event->value, XtRString)) XmuSnprintf(buf, sizeof(buf), "Could not convert the string '%s' for the `%s' " - "resource.", info->event->value, info->event->name); + "resource.", (String)info->event->value, + info->event->name); else XmuSnprintf(buf, sizeof(buf), "Could not convert the `%s' resource.", @@ -2189,11 +2193,11 @@ _XEditresGetStringValues(Widget w, Arg *warg, int numargs) XmuSnprintf(buffer, sizeof(buffer), "%d", (int)(value & 0xffff)); break; case sizeof(int): - XmuSnprintf(buffer, sizeof(buffer), "0x%08hx", (int)value); + XmuSnprintf(buffer, sizeof(buffer), "0x%08x", (int)value); break; #ifdef LONG_64 case sizeof(long): - XmuSnprintf(buffer, sizeof(buffer), "0x%016hx", value); + XmuSnprintf(buffer, sizeof(buffer), "0x%016lx", value); break; #endif } |