]> granicus.if.org Git - graphviz/commitdiff
lib/glcomp: remove some unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 21 Mar 2022 04:34:02 +0000 (21:34 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Mar 2022 05:31:13 +0000 (22:31 -0700)
lib/glcomp/glcompbutton.c
lib/glcomp/glcompimage.c
lib/glcomp/glpangofont.c

index d81fbd3454e54de4f9fb825d6c57233b7c2b67b7..04c6ba1eb66ac228e011bddf5d6333a56d97b2bb 100644 (file)
@@ -137,7 +137,7 @@ void glCompButtonDraw(glCompButton * p)
     if (p->image)
        p->image->common.functions.draw((void *) p->image);
     if (p->common.callbacks.draw)
-       p->common.callbacks.draw((void *) p);   /*user defined drawing routines are called here. */
+       p->common.callbacks.draw(p);    /*user defined drawing routines are called here. */
 }
 
 void glCompButtonClick(glCompObj * o, GLfloat x, GLfloat y,
index 3f71a132ca758f8c3f88d9547429f5ac46893fc7..4089c42ae4a3641a28a101069f541f151d852e86 100644 (file)
@@ -87,7 +87,7 @@ int glCompImageLoadPng(glCompImage * i, char *pngFile,int is2D)
 
 void glCompImageDraw(void *obj)
 {
-    glCompImage *p = (glCompImage *) obj;
+    glCompImage *p = obj;
     glCompCommon ref = p->common;
     GLfloat w,h,d;
 
index 2da2109d9165b408a6f1a1662030bd7e14c5fac4..28e8271a4d053553c40398228f4b15e2192661cc 100644 (file)
@@ -79,7 +79,7 @@ static PangoLayout *get_pango_layout(char *markup_text,
 static cairo_status_t
 writer(void *closure, const unsigned char *data, unsigned int length)
 {
-    if (length == fwrite(data, 1, length, (FILE *) closure)) {
+    if (length == fwrite(data, 1, length, closure)) {
        return CAIRO_STATUS_SUCCESS;
     }