Fix a warning from clang about an implicit conversion
authorAntonio Ospite <ao2@ao2.it>
Fri, 23 Jun 2017 14:38:24 +0000 (16:38 +0200)
committerAntonio Ospite <ao2@ao2.it>
Fri, 23 Jun 2017 14:38:24 +0000 (16:38 +0200)
xicursorset.c:84:32: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
        image = XcursorShapeLoadImage(shape, theme, size);
                ~~~~~~~~~~~~~~~~~~~~~ ^~~~~

The casting is safe because at that point in the code the value is
guaranteed to be non-negative.

xicursorset.c

index 7c18c0f..d45ec5e 100644 (file)
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
                }
        }
 
-       image = XcursorShapeLoadImage(shape, theme, size);
+       image = XcursorShapeLoadImage((unsigned int)shape, theme, size);
        if (image == NULL) {
                fprintf(stderr, "Can't get cursor image, check <shape> or <theme>.\n");
                return EXIT_FAILURE;