[evolution-ews] Fix "variable may be used uninitialized" warning in query-to-restriction conversion
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Fix "variable may be used uninitialized" warning in query-to-restriction conversion
- Date: Mon, 16 Jan 2017 09:46:52 +0000 (UTC)
commit 4f1ff3cf13f73de075b6827998698b2af14c7a2f
Author: Milan Crha <mcrha redhat com>
Date: Mon Jan 16 10:45:06 2017 +0100
Fix "variable may be used uninitialized" warning in query-to-restriction conversion
src/server/e-ews-query-to-restriction.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/server/e-ews-query-to-restriction.c b/src/server/e-ews-query-to-restriction.c
index d7bca3f..ee51aa6 100644
--- a/src/server/e-ews-query-to-restriction.c
+++ b/src/server/e-ews-query-to-restriction.c
@@ -634,7 +634,6 @@ calendar_func_occur_in_time_range (ESExp *f,
{
ESExpResult *r;
EvalContext *ctx = data;
- gchar *start, *end;
if (argv[0]->type != ESEXP_RES_TIME) {
e_sexp_fatal_error (
@@ -653,6 +652,8 @@ calendar_func_occur_in_time_range (ESExp *f,
if (!ctx->msg) {
ctx->any_applicable = TRUE;
} else {
+ gchar *start, *end;
+
start = e_ews_make_timestamp (argv[0]->value.time);
end = e_ews_make_timestamp (argv[1]->value.time);
@@ -660,13 +661,13 @@ calendar_func_occur_in_time_range (ESExp *f,
ews_restriction_write_greater_than_or_equal_to_message (ctx, "calendar:Start", start);
ews_restriction_write_less_than_or_equal_to_message (ctx, "calendar:End", end);
e_soap_message_end_element (ctx->msg);
+
+ g_free (start);
+ g_free (end);
}
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
- g_free (start);
- g_free (end);
-
return r;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]