Commit 48aacb0b authored by Almer S. Tigelaar's avatar Almer S. Tigelaar Committed by Almer S. Tigelaar
Browse files

Give a warning when both the resulting ExprTree and error message is

2001-04-30  Almer S. Tigelaar  <almer@gnome.org>

	* src/parser.y (gnumeric_expr_parser) : Give a warning
	when both the resulting ExprTree and error message is non-null.
	This should never happen.
parent 422c4617
2001-04-30 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (gnumeric_expr_parser) : Give a warning
when both the resulting ExprTree and error message is non-null.
This should never happen.
2001-04-29 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (yylex) : return INVALID_TOKEN rather than EOF when a
......
2001-04-30 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (gnumeric_expr_parser) : Give a warning
when both the resulting ExprTree and error message is non-null.
This should never happen.
2001-04-29 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (yylex) : return INVALID_TOKEN rather than EOF when a
......
2001-04-30 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (gnumeric_expr_parser) : Give a warning
when both the resulting ExprTree and error message is non-null.
This should never happen.
2001-04-29 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (yylex) : return INVALID_TOKEN rather than EOF when a
......
2001-04-30 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (gnumeric_expr_parser) : Give a warning
when both the resulting ExprTree and error message is non-null.
This should never happen.
2001-04-29 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (yylex) : return INVALID_TOKEN rather than EOF when a
......
2001-04-30 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (gnumeric_expr_parser) : Give a warning
when both the resulting ExprTree and error message is non-null.
This should never happen.
2001-04-29 Jody Goldberg <jgoldberg@home.com>
* src/parser.y (yylex) : return INVALID_TOKEN rather than EOF when a
......
......@@ -917,18 +917,9 @@ gnumeric_expr_parser (char const *expr_text, ParsePos const *pos,
#ifndef KEEP_DEALLOCATION_STACK_BETWEEN_CALLS
deallocate_uninit ();
#endif
/*
* If an error has occured we ALWAYS return NULL.
* In some cases the expression tree may have been partially
* built-up before an error occurs. Therefore the pstate.result
* (which is resulting ExprTree) must be freed in case it's non-null
* and an error has occured.
*/
if (pstate.error->message != NULL) {
if (pstate.result)
expr_tree_unref (pstate.result);
return NULL;
} else
return pstate.result;
if (pstate.error->message && pstate.result)
g_warning ("An error occurred and the ExprTree is non-null! This should not happen");
return pstate.result;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment