]> granicus.if.org Git - graphviz/commitdiff
Apply patch for C standards compliance:
authorellson <devnull@localhost>
Sun, 21 Dec 2008 14:26:46 +0000 (14:26 +0000)
committerellson <devnull@localhost>
Sun, 21 Dec 2008 14:26:46 +0000 (14:26 +0000)
"All declarations that
refer to the same object or function shall have compatible type;
otherwise, the behavior is undefined."  (That's from ISO/IEC 9899:TC2
final committee draft, section 6.2.7.)

This doesn't trigger issues with most C implementations, but there
is one implementation in development (GCC LTO branch) which does
flag this issue.

Patch from: Chris Demetriou <cgd@google.com>

plugin/core/gvplugin_core.c

index c292623325d3b6e0ea6c524c7db3b63656f6d9fb..1f90d9a00b56438e52a2821389ff48ca9c3922b0 100644 (file)
 
 #include "gvplugin.h"
 
-extern gvplugin_installed_t gvdevice_dot_types;
-extern gvplugin_installed_t gvdevice_fig_types;
-extern gvplugin_installed_t gvdevice_map_types;
-extern gvplugin_installed_t gvdevice_ps_types;
-extern gvplugin_installed_t gvdevice_svg_types;
-extern gvplugin_installed_t gvdevice_tk_types;
-extern gvplugin_installed_t gvdevice_vml_types;
-
-extern gvplugin_installed_t gvrender_dot_types;
-extern gvplugin_installed_t gvrender_fig_types;
-extern gvplugin_installed_t gvrender_map_types;
-extern gvplugin_installed_t gvrender_ps_types;
-extern gvplugin_installed_t gvrender_svg_types;
-extern gvplugin_installed_t gvrender_tk_types;
-extern gvplugin_installed_t gvrender_vml_types;
-
-extern gvplugin_installed_t gvloadimage_core_types;
+extern gvplugin_installed_t gvdevice_dot_types[];
+extern gvplugin_installed_t gvdevice_fig_types[];
+extern gvplugin_installed_t gvdevice_map_types[];
+extern gvplugin_installed_t gvdevice_ps_types[];
+extern gvplugin_installed_t gvdevice_svg_types[];
+extern gvplugin_installed_t gvdevice_tk_types[];
+extern gvplugin_installed_t gvdevice_vml_types[];
+
+extern gvplugin_installed_t gvrender_dot_types[];
+extern gvplugin_installed_t gvrender_fig_types[];
+extern gvplugin_installed_t gvrender_map_types[];
+extern gvplugin_installed_t gvrender_ps_types[];
+extern gvplugin_installed_t gvrender_svg_types[];
+extern gvplugin_installed_t gvrender_tk_types[];
+extern gvplugin_installed_t gvrender_vml_types[];
+
+extern gvplugin_installed_t gvloadimage_core_types[];
 
 static gvplugin_api_t apis[] = {
-    {API_device, &gvdevice_dot_types},
-    {API_device, &gvdevice_fig_types},
-    {API_device, &gvdevice_map_types},
-    {API_device, &gvdevice_ps_types},
-    {API_device, &gvdevice_svg_types},
-    {API_device, &gvdevice_tk_types},
-    {API_device, &gvdevice_vml_types},
-
-    {API_render, &gvrender_dot_types},
-    {API_render, &gvrender_fig_types},
-    {API_render, &gvrender_map_types},
-    {API_render, &gvrender_ps_types},
-    {API_render, &gvrender_svg_types},
-    {API_render, &gvrender_tk_types},
-    {API_render, &gvrender_vml_types},
-
-    {API_loadimage, &gvloadimage_core_types},
+    {API_device, gvdevice_dot_types},
+    {API_device, gvdevice_fig_types},
+    {API_device, gvdevice_map_types},
+    {API_device, gvdevice_ps_types},
+    {API_device, gvdevice_svg_types},
+    {API_device, gvdevice_tk_types},
+    {API_device, gvdevice_vml_types},
+
+    {API_render, gvrender_dot_types},
+    {API_render, gvrender_fig_types},
+    {API_render, gvrender_map_types},
+    {API_render, gvrender_ps_types},
+    {API_render, gvrender_svg_types},
+    {API_render, gvrender_tk_types},
+    {API_render, gvrender_vml_types},
+
+    {API_loadimage, gvloadimage_core_types},
 
     {(api_t)0, 0},
 };