]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary casts of parameters to agwrite
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Jul 2021 16:46:35 +0000 (09:46 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Jul 2021 04:58:32 +0000 (21:58 -0700)
The second argument to agwrite is a void*, to which other pointers implicitly
coerce.

cmd/smyrna/viewport.c
plugin/core/gvrender_core_dot.c

index cf2b9174bfb0b8b48b9b8b33d4c5f2b3b9d51ca0..0f68dcc6f6514684e3dd0d4cce8896692f31babd 100644 (file)
@@ -591,7 +591,7 @@ int save_graph_with_file_name(Agraph_t * graph, char *fileName)
        return 0;
     }
 
-    ret = agwrite(graph, (void *) output_file);
+    ret = agwrite(graph, output_file);
     fclose (output_file);
     if (ret) {
        g_print("%s successfully saved \n", fileName);
index 602c87cbe91dae58d064470f2adfac3a93edabbb..b1dcde3fed654e7109e3268e59810658d487e541 100644 (file)
@@ -531,14 +531,14 @@ static void dot_end_graph(GVJ_t *job)
        case FORMAT_DOT:
        case FORMAT_CANON:
            if (!(job->flags & OUTPUT_NOT_REQUIRED))
-               agwrite(g, (FILE*)job);
+               agwrite(g, job);
            break;
        case FORMAT_XDOT:
        case FORMAT_XDOT12:
        case FORMAT_XDOT14:
            xdot_end_graph(g);
            if (!(job->flags & OUTPUT_NOT_REQUIRED))
-               agwrite(g, (FILE*)job);
+               agwrite(g, job);
            break;
     }
     g->clos->disc.io = io_save;