diff options
author | c | 2024-01-28 21:43:37 -0500 |
---|---|---|
committer | c | 2024-01-28 21:43:37 -0500 |
commit | ca20ff4f4d0ac63856e538f9f4cef97197bf6465 (patch) | |
tree | ba8886c8832e082332a284e3b18fb0e4bbce3d05 /src/tree.c | |
parent | 422606d8b3cc6fba74f97af46f0378fc274d60ad (diff) |
Fixed buffer-overflow.
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -130,13 +130,20 @@ int tree_cmp(tree_t* tree_0, tree_t* tree_1) { return (strcmp(tree_0->data.call.target, tree_1->data.call.target) == 0) && tree_cmp(tree_0->data.call.arg, tree_1->data.call.arg); break; + default: + log_war("Unknown tree type."); } + + return 0; } /* Every time I think there's a problem with the parser, it turns out it's - just this stupid tree print function. + just this stupid tree print function. Now it works. Never touching it + again. Ever. */ +#pragma GCC diagnostic ignored "-Wunused-value" +#pragma GCC diagnostic ignored "-Wmisleading-indentation" void tree_print(tree_t* tree, int nest) { char*sp;int nc, i;char*c;char*bc;for(i =0,sp=ecalloc(nest+1,sizeof(char)),sp[ @@ -226,3 +233,5 @@ void tree_print(tree_t* tree, int nest) { free(bc); return; } +#pragma GCC diagnostic warning "-Wunused-value" +#pragma GCC diagnostic warning "-Wmisleading-indentation" |