Skip to content

Fix build with GCC13

Elliott Sales de Andrade requested to merge QuLogic/inkscape:gcc13 into master

GCC 13 now complains about this line:

src/ui/widget/selected-style.cpp:111:6: error: statement-expressions are not allowed outside functions nor in template-argument lists
  111 |     {g_strdup("application/x-oswb-color"), 0, APP_OSWB_COLOR}
      |      ^~~~~~~~

However, it is not necessary to strdup the string constant as the value just needs to exist indefinitely, and it will as a constant. While C doesn't mind the const difference, a simple cast will silence C++'s higher strictness.

And in fact, the other use of GtkTargetEntry in src/ui/drag-and-drop.cpp does the same cast.

Fixes inbox#8244 (moved)

Merge request reports