From http://www.jwz.org/xscreensaver/xscreensaver-5.27.tar.gz
[xscreensaver] / utils / grabclient.c
index 082f1f167a7e5a62dafda935e156b4a9da99e510..47d1c3bd5d5ebb3a1d3f95885ae2586c39130f3b 100644 (file)
@@ -564,6 +564,7 @@ pipe_cb (XtPointer closure, int *source, XtInputId *id)
   char buf[10240];
   const char *dir = clo2->directory;
   char *absfile = 0;
+  *buf = 0;
   fgets (buf, sizeof(buf)-1, clo2->pipe);
   pclose (clo2->pipe);
   clo2->pipe = 0;
@@ -629,7 +630,7 @@ pipe_cb (XtPointer closure, int *source, XtInputId *id)
       /* Replace slashes with newlines */
       /* while (dot = strchr(buf, '/')) *dot = '\n'; */
       /* Replace slashes with spaces */
-      while ((dot = strchr(buf, '/'))) *dot = ' ';
+      /* while ((dot = strchr(buf, '/'))) *dot = ' '; */
     }
 
   if (absfile) free (absfile);
@@ -861,7 +862,7 @@ print_loading_msg (Screen *screen, Window window)
   fn = 0;
 
   XGetWindowAttributes (dpy, window, &xgwa);
-  w = XTextWidth (f, text, strlen(text));
+  w = XTextWidth (f, text, (int) strlen(text));
 
   gcv.foreground = get_pixel_resource (dpy, xgwa.colormap,
                                        "foreground", "Foreground");
@@ -872,7 +873,7 @@ print_loading_msg (Screen *screen, Window window)
   XDrawImageString (dpy, window, gc,
                     (xgwa.width - w) / 2,
                     (xgwa.height - (f->ascent + f->descent)) / 2 + f->ascent,
-                    text, strlen(text));
+                    text, (int) strlen(text));
   XFreeFont (dpy, f);
   XFreeGC (dpy, gc);
   XSync (dpy, False);