We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding -Wall -Wextra with gcc give a few warnings and some of then I fixed as shown bellow:
-Wall -Wextra
gcc
diff --git a/src/yaep.c b/src/yaep.c index 3719017..b68cce8 100644 --- a/src/yaep.c +++ b/src/yaep.c @@ -5263,8 +5263,8 @@ static vlo_t *tnodes_vlo; static struct yaep_tree_node * prune_to_minimal (struct yaep_tree_node *node, int *cost) { - struct yaep_tree_node *child, *alt, *next_alt, *result; - int i, min_cost; + struct yaep_tree_node *child, *alt, *next_alt, *result = NULL; + int i, min_cost = 0; assert (node != NULL); switch (node->type) @@ -5431,7 +5431,7 @@ make_parse (int *ambiguous_p) struct yaep_tree_node *parent_anode, *anode, root_anode; int parent_disp; int saved_one_parse_p; - struct yaep_tree_node **term_node_array; + struct yaep_tree_node **term_node_array = NULL; #ifndef __cplusplus vlo_t stack, orig_states; #else @@ -6420,7 +6420,7 @@ read_rule (const char ***rhs, const char **anode, int *anode_cost, /* The following variable is the current number of next input token. */ -static int ntok; +static size_t ntok; /* The following function imported by Earley's algorithm (see comments in the interface file). */
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Adding
-Wall -Wextra
withgcc
give a few warnings and some of then I fixed as shown bellow:The text was updated successfully, but these errors were encountered: