summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2008-01-13 01:58:12 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2008-01-13 01:58:12 -0800
commit6f5ea6a2a0b56674f08f58d95085c0e9a8797fe2 (patch)
tree6a1d5832e159f35a7bcc6a5249297986df22f20e
parent6f76ccc70a5f5ae834a3e63c9f4f35704837a4d1 (diff)
downloadxorg-lib-libXmu-6f5ea6a2a0b56674f08f58d95085c0e9a8797fe2.tar.gz
Clear sparse warnings: Using plain integer as NULL pointer
-rw-r--r--src/Clip.c4
-rw-r--r--src/StdCmap.c4
-rw-r--r--src/StrToWidg.c5
3 files changed, 8 insertions, 5 deletions
diff --git a/src/Clip.c b/src/Clip.c
index 8d2c845..121a69f 100644
--- a/src/Clip.c
+++ b/src/Clip.c
@@ -799,8 +799,8 @@ XmuScanline *
XmuScanlineNot(XmuScanline *scanline, int minx, int maxx)
{
XmuSegment *z;
- static XmuSegment x = { 0, 0, 0 };
- static XmuScanline and = { 0, &x, 0 };
+ static XmuSegment x = { 0, 0, NULL };
+ static XmuScanline and = { 0, &x, NULL };
if (!scanline)
return (scanline);
diff --git a/src/StdCmap.c b/src/StdCmap.c
index ffce489..3fb3f25 100644
--- a/src/StdCmap.c
+++ b/src/StdCmap.c
@@ -91,7 +91,7 @@ XmuStandardColormap(Display *dpy, int screen, VisualID visualid,
vinfo_template.depth = depth;
vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask;
if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL)
- return 0;
+ return NULL;
/* Check the validity of the combination of visual characteristics,
* allocation, and colormap property. Create an XStandardColormap
@@ -101,7 +101,7 @@ XmuStandardColormap(Display *dpy, int screen, VisualID visualid,
if (! valid_args(vinfo, red_max, green_max, blue_max, property)
|| ((stdcmap = XAllocStandardColormap()) == NULL)) {
XFree((char *) vinfo);
- return 0;
+ return NULL;
}
/* Fill in the XStandardColormap structure */
diff --git a/src/StrToWidg.c b/src/StrToWidg.c
index 22411de..b9fb8a9 100644
--- a/src/StrToWidg.c
+++ b/src/StrToWidg.c
@@ -63,8 +63,11 @@ XmuCvtStringToWidget(XrmValuePtr args, Cardinal *num_args,
int i;
if (*num_args != 1)
+ {
+ i = 0;
XtErrorMsg("wrongParameters", "cvtStringToWidget", "xtToolkitError",
- "StringToWidget conversion needs parent arg", NULL, 0);
+ "StringToWidget conversion needs parent arg", NULL, &i);
+ }
parent = *(Widget*)args[0].addr;
/* try to match names of normal children */