]> granicus.if.org Git - graphviz/commitdiff
gvplugin_gdiplus_LTX_library: squash a -Wwrite-strings warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 20 Nov 2021 18:10:27 +0000 (10:10 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 24 Nov 2021 15:47:40 +0000 (07:47 -0800)
In future, maybe `gvplugin_library_t` should be modified to make its string
member const, given it is always expected to be a string literal.

plugin/gdiplus/gvplugin_gdiplus.cpp

index 86f247dce96dcbdf122f8fbdc89cdbe2bd5d4d69..de99a598274f7e8b060c1340d577e623d8feef71 100644 (file)
@@ -96,7 +96,9 @@ extern "C" {
 #   define GVPLUGIN_GDIPLUS_API
 #endif
 
-GVPLUGIN_GDIPLUS_API gvplugin_library_t gvplugin_gdiplus_LTX_library = { "gdiplus", apis };
+GVPLUGIN_GDIPLUS_API gvplugin_library_t gvplugin_gdiplus_LTX_library = {
+  const_cast<char*>("gdiplus"), apis
+};
 
 #ifdef __cplusplus
 }