Browse Source

Fixed issues cropping up from building -O3

master
Patrick Jakobsen 7 months ago
parent
commit
5be35aa3de
2 changed files with 7 additions and 1 deletions
  1. +1
    -1
      gui/build.sh
  2. +6
    -0
      gui/gui.c

+ 1
- 1
gui/build.sh View File

@ -1 +1 @@
gcc -g -Wall -Wextra $1 -fsanitize=address,undefined gui.c stb_truetype.o -lX11 -lm
gcc -g -Wall -Wextra -Wno-stringop-overflow $1 -fsanitize=address,undefined gui.c stb_truetype.o -lX11 -lm

+ 6
- 0
gui/gui.c View File

@ -610,7 +610,13 @@ GUI_Subtree_Reference gui_get_subtree(
i = i->sibling)
{
GUI_Subtree *subtree = (GUI_Subtree*)i;
// NOTE(Zelaven): This line falsely triggers -Wstringop-overflow and the
// copy into a temporary variable seemingly fixes it.
// For this reason I simply opted to use -Wno-stringop-overflow, as I
// don't want to have a broken flag enabled.
rdic_cull_subtrees(&subtree->rdic, subtree->rdic.root);
//RDIC_Context *rdic_context = &subtree->rdic;
//rdic_cull_subtrees(rdic_context, subtree->rdic.root);
}
}

Loading…
Cancel
Save