Merge pull request #2333 from joelmartinez/docs-classic-fix
[mono.git] / mono / mini / graph.c
index d9b0adec2f1341ec9f7a076d8c2231d5bef07b97..08d2891f87c239c138f3d1e48284f3f8c8399aef 100644 (file)
@@ -20,7 +20,7 @@ static char *
 convert_name (const char *str)
 {
        int i, j, len = strlen (str);
-       char *res = g_malloc (len * 2);
+       char *res = (char *)g_malloc (len * 2);
 
        j = 0;
        for (i = 0; i < len; i++) {
@@ -336,10 +336,14 @@ mono_draw_graph (MonoCompile *cfg, MonoGraphOptions draw_options)
 
        fclose (fp);
 
+#ifdef HAVE_SYSTEM
        //com = g_strdup_printf ("dot %s -Tpng -o %s.png; eog %s.png", fn, fn, fn);
        com = g_strdup_printf ("dot %s -Tps -o %s.ps;gv %s.ps", fn, fn, fn);
        _i = system (com);
        g_free (com);
+#else
+       g_assert_not_reached ();
+#endif
 }
 
 #endif /* DISABLE_JIT */