diff options
-rw-r--r-- | src/display.c | 4 | ||||
-rw-r--r-- | src/file.c | 3 | ||||
-rw-r--r-- | src/library.c | 9 | ||||
-rw-r--r-- | src/xlib.c | 2 |
4 files changed, 7 insertions, 11 deletions
diff --git a/src/display.c b/src/display.c index 2c56ba9..a61b5fd 100644 --- a/src/display.c +++ b/src/display.c @@ -72,7 +72,7 @@ _XcursorCloseDisplay (Display *dpy, XExtCodes *codes) static int _XcursorDefaultParseBool (char *v) { - char c0, c1; + char c0; c0 = *v; if (isupper ((int)c0)) @@ -83,7 +83,7 @@ _XcursorDefaultParseBool (char *v) return 0; if (c0 == 'o') { - c1 = v[1]; + char c1 = v[1]; if (isupper ((int)c1)) c1 = (char) tolower (c1); if (c1 == 'n') @@ -655,7 +655,6 @@ XcursorXcFileLoadImages (XcursorFile *file, int size) int nsize; XcursorImages *images; int n; - int toc; if (!file || size < 0) return NULL; @@ -676,7 +675,7 @@ XcursorXcFileLoadImages (XcursorFile *file, int size) } for (n = 0; n < nsize; n++) { - toc = _XcursorFindImageToc (fileHeader, bestSize, n); + int toc = _XcursorFindImageToc (fileHeader, bestSize, n); if (toc < 0) break; images->images[images->nimage] = _XcursorReadImage (file, fileHeader, diff --git a/src/library.c b/src/library.c index 83527c4..c43d190 100644 --- a/src/library.c +++ b/src/library.c @@ -180,7 +180,6 @@ _XcursorThemeInherits (const char *full) if (!strncmp (line, "Inherits", 8)) { char *l = line + 8; - char *r; while (*l == ' ') l++; if (*l != '=') continue; l++; @@ -188,7 +187,7 @@ _XcursorThemeInherits (const char *full) result = malloc (strlen (l) + 1); if (result) { - r = result; + char *r = result; while (*l) { while (XcursorSep(*l) || XcursorWhite (*l)) l++; @@ -561,15 +560,13 @@ int XcursorLibraryShape (const char *library) { int low, high; - int mid; - int c; low = 0; high = NUM_STANDARD_NAMES - 1; while (low < high - 1) { - mid = (low + high) >> 1; - c = strcmp (library, STANDARD_NAME (mid)); + int mid = (low + high) >> 1; + int c = strcmp (library, STANDARD_NAME (mid)); if (c == 0) return (mid << 1); if (c > 0) @@ -32,7 +32,6 @@ _XcursorFontIsCursor (Display *dpy, Font font) XcursorDisplayInfo *info; XcursorBool ret; XFontStruct *fs; - int n; Atom cursor; if (!dpy || !font) @@ -57,6 +56,7 @@ _XcursorFontIsCursor (Display *dpy, Font font) fs = XQueryFont (dpy, font); if (fs) { + int n; cursor = XInternAtom (dpy, "cursor", False); for (n = 0; n < fs->n_properties; n++) if (fs->properties[n].name == XA_FONT) |