[gnome-calendar/gbsneto/ci-build-warnings] project: Silence CI warnings
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gbsneto/ci-build-warnings] project: Silence CI warnings
- Date: Sat, 31 Oct 2020 19:55:14 +0000 (UTC)
commit a146b9050d13cc72e7a29c7887be7b4546cb0fb6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Oct 31 16:42:54 2020 -0300
project: Silence CI warnings
src/core/gcal-clock.c | 4 ++--
src/gui/gcal-quick-add-popover.c | 6 ++++--
src/gui/gcal-weather-settings.c | 4 ++--
src/gui/gcal-window.c | 2 +-
src/gui/views/gcal-month-cell.c | 4 ++--
src/gui/views/gcal-month-popover.c | 2 +-
src/gui/views/gcal-month-view.c | 2 +-
src/gui/views/gcal-week-grid.c | 7 ++++---
src/gui/views/gcal-week-header.c | 18 ++++++++++++------
src/gui/views/gcal-year-view.c | 3 ++-
src/main.c | 2 +-
src/utils/gcal-utils.c | 2 +-
src/weather/gcal-weather-service.c | 4 ++--
13 files changed, 35 insertions(+), 25 deletions(-)
---
diff --git a/src/core/gcal-clock.c b/src/core/gcal-clock.c
index 0d8869b4..d9e81a88 100644
--- a/src/core/gcal-clock.c
+++ b/src/core/gcal-clock.c
@@ -57,7 +57,7 @@ static guint signals[NUM_SIGNALS] = { 0, };
static void
update_current_date (GcalClock *self)
{
- g_autoptr (GDateTime) now;
+ g_autoptr (GDateTime) now = NULL;
gboolean minute_changed;
gboolean hour_changed;
gboolean day_changed;
@@ -91,7 +91,7 @@ update_current_date (GcalClock *self)
static void
schedule_update_timeout (GcalClock *self)
{
- g_autoptr (GDateTime) now;
+ g_autoptr (GDateTime) now = NULL;
guint seconds_between;
/* Remove the previous timeout if we came from resume */
diff --git a/src/gui/gcal-quick-add-popover.c b/src/gui/gcal-quick-add-popover.c
index 6852e147..33df9650 100644
--- a/src/gui/gcal-quick-add-popover.c
+++ b/src/gui/gcal-quick-add-popover.c
@@ -451,7 +451,9 @@ update_header (GcalQuickAddPopover *self)
}
else
{
- g_autofree gchar *start_hour, *end_hour, *event_date_name;
+ g_autofree gchar *event_date_name = NULL;
+ g_autofree gchar *start_hour = NULL;
+ g_autofree gchar *end_hour = NULL;
GcalTimeFormat time_format;
gchar *hour_format;
@@ -475,7 +477,7 @@ update_header (GcalQuickAddPopover *self)
}
else
{
- g_autofree gchar *event_date_name;
+ g_autofree gchar *event_date_name = NULL;
event_date_name = get_date_string_for_day (self->date_start);
title_date = g_strdup_printf ("%s", event_date_name);
}
diff --git a/src/gui/gcal-weather-settings.c b/src/gui/gcal-weather-settings.c
index ff2a48f6..6773ea5a 100644
--- a/src/gui/gcal-weather-settings.c
+++ b/src/gui/gcal-weather-settings.c
@@ -105,7 +105,7 @@ load_weather_settings (GcalWeatherSettings *self)
}
else
{
- g_autoptr (GWeatherLocation) weather_location;
+ g_autoptr (GWeatherLocation) weather_location = NULL;
GWeatherLocation *world;
world = gweather_location_get_world ();
@@ -170,7 +170,7 @@ update_menu_weather_sensitivity (GcalWeatherSettings *self)
static GWeatherLocation*
get_checked_fixed_location (GcalWeatherSettings *self)
{
- g_autoptr (GWeatherLocation) location;
+ g_autoptr (GWeatherLocation) location = NULL;
location = gweather_location_entry_get_location (GWEATHER_LOCATION_ENTRY (self->weather_location_entry));
diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c
index 4d2b94a4..06163d5b 100644
--- a/src/gui/gcal-window.c
+++ b/src/gui/gcal-window.c
@@ -192,7 +192,7 @@ static GParamSpec* properties[N_PROPS] = { NULL, };
static void
update_today_button_sensitive (GcalWindow *window)
{
- g_autoptr (GDateTime) now;
+ g_autoptr (GDateTime) now = NULL;
gboolean sensitive;
GCAL_ENTRY;
diff --git a/src/gui/views/gcal-month-cell.c b/src/gui/views/gcal-month-cell.c
index d6f24550..5bb71a2a 100644
--- a/src/gui/views/gcal-month-cell.c
+++ b/src/gui/views/gcal-month-cell.c
@@ -81,7 +81,7 @@ static GParamSpec *properties[N_PROPS] = { 0, };
static void
update_style_flags (GcalMonthCell *self)
{
- g_autoptr (GDateTime) today;
+ g_autoptr (GDateTime) today = NULL;
GtkStyleContext *context;
GtkStateFlags flags;
GtkWidget *widget;
@@ -261,7 +261,7 @@ gcal_month_cell_drag_drop (GtkWidget *widget,
current_month != start_month ||
current_year != start_year)
{
- g_autoptr (GDateTime) new_start;
+ g_autoptr (GDateTime) new_start = NULL;
new_start = g_date_time_add_days (start_dt, diff);
diff --git a/src/gui/views/gcal-month-popover.c b/src/gui/views/gcal-month-popover.c
index be03bfac..05b044f5 100644
--- a/src/gui/views/gcal-month-popover.c
+++ b/src/gui/views/gcal-month-popover.c
@@ -881,7 +881,7 @@ gcal_month_popover_set_date (GcalMonthPopover *self,
if (date)
{
- g_autofree gchar *label;
+ g_autofree gchar *label = NULL;
self->date = g_date_time_ref (date);
diff --git a/src/gui/views/gcal-month-view.c b/src/gui/views/gcal-month-view.c
index 0558a6f5..18f52cdc 100644
--- a/src/gui/views/gcal-month-view.c
+++ b/src/gui/views/gcal-month-view.c
@@ -1072,7 +1072,7 @@ update_weekday_labels (GcalMonthView *self)
for (i = 0; i < 7; i++)
{
- g_autofree gchar *weekday_name;
+ g_autofree gchar *weekday_name = NULL;
weekday_name = g_utf8_strup (gcal_get_weekday ((i + self->first_weekday) % 7), -1);
diff --git a/src/gui/views/gcal-week-grid.c b/src/gui/views/gcal-week-grid.c
index cc07af9b..8df2a5e4 100644
--- a/src/gui/views/gcal-week-grid.c
+++ b/src/gui/views/gcal-week-grid.c
@@ -129,7 +129,7 @@ static inline guint
get_event_index (GcalRangeTree *tree,
GcalRange *range)
{
- g_autoptr (GPtrArray) array;
+ g_autoptr (GPtrArray) array = NULL;
gint idx, i;
i = idx = 0;
@@ -342,7 +342,8 @@ gcal_week_grid_unmap (GtkWidget *widget)
static inline gint
get_today_column (GcalWeekGrid *self)
{
- g_autoptr(GDateTime) today, week_start;
+ g_autoptr(GDateTime) week_start = NULL;
+ g_autoptr(GDateTime) today = NULL;
gint days_diff;
today = g_date_time_new_now_local ();
@@ -486,7 +487,7 @@ gcal_week_grid_draw (GtkWidget *widget,
if (today_column != -1)
{
- g_autoptr (GDateTime) now;
+ g_autoptr (GDateTime) now = NULL;
GtkBorder margin;
gdouble strip_width;
guint minutes_from_midnight;
diff --git a/src/gui/views/gcal-week-header.c b/src/gui/views/gcal-week-header.c
index 20354ccf..e722bdb6 100644
--- a/src/gui/views/gcal-week-header.c
+++ b/src/gui/views/gcal-week-header.c
@@ -286,7 +286,9 @@ on_button_released (GcalWeekHeader *self,
GdkEventButton *event,
GtkWidget *widget)
{
- g_autoptr (GDateTime) week_start, selection_start, selection_end;
+ g_autoptr (GDateTime) selection_start = NULL;
+ g_autoptr (GDateTime) selection_end = NULL;
+ g_autoptr (GDateTime) week_start = NULL;
GtkWidget *weekview;
gboolean ltr;
gdouble column_width;
@@ -378,7 +380,8 @@ get_event_by_uuid (GcalWeekHeader *self,
static inline gint
get_today_column (GcalWeekHeader *self)
{
- g_autoptr(GDateTime) today, week_start;
+ g_autoptr (GDateTime) week_start = NULL;
+ g_autoptr (GDateTime) today = NULL;
gint days_diff;
today = g_date_time_new_now_local ();
@@ -677,7 +680,7 @@ split_event_widget_at_column (GcalWeekHeader *self,
/* Create a new widget after the current widget */
if (create_after)
{
- g_autoptr (GDateTime) event_end;
+ g_autoptr (GDateTime) event_end = NULL;
GtkWidget *widget_after;
event_end = g_date_time_to_local (gcal_event_widget_get_date_end (GCAL_EVENT_WIDGET (widget)));
@@ -888,8 +891,10 @@ static void
update_unchanged_events (GcalWeekHeader *self,
GDateTime *new_date)
{
- g_autoptr (GDateTime) new_week_start, new_week_end;
- g_autoptr (GDateTime) utc_week_start, utc_week_end;
+ g_autoptr (GDateTime) new_week_start = NULL;
+ g_autoptr (GDateTime) utc_week_start = NULL;
+ g_autoptr (GDateTime) new_week_end = NULL;
+ g_autoptr (GDateTime) utc_week_end = NULL;
GList *events_to_update, *l;
gint weekday;
@@ -912,7 +917,8 @@ update_unchanged_events (GcalWeekHeader *self,
for (l = events; l != NULL; l = l->next)
{
- g_autoptr (GDateTime) event_start, event_end;
+ g_autoptr (GDateTime) event_start = NULL;
+ g_autoptr (GDateTime) event_end = NULL;
GDateTime *week_start, *week_end;
/*
diff --git a/src/gui/views/gcal-year-view.c b/src/gui/views/gcal-year-view.c
index bc7f38a5..ac32a8f9 100644
--- a/src/gui/views/gcal-year-view.c
+++ b/src/gui/views/gcal-year-view.c
@@ -713,7 +713,8 @@ count_events_at_day (GcalYearView *self,
for (i = 0; i < events->len; i++)
{
- g_autoptr (GDateTime) event_start, event_end;
+ g_autoptr (GDateTime) event_start = NULL;
+ g_autoptr (GDateTime) event_end = NULL;
GcalEvent *event;
event = g_ptr_array_index (events, i);
diff --git a/src/main.c b/src/main.c
index 0b25377c..6d00a855 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,7 +26,7 @@ gint
main (gint argc,
gchar **argv)
{
- g_autoptr (GcalApplication) app;
+ g_autoptr (GcalApplication) app = NULL;
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
diff --git a/src/utils/gcal-utils.c b/src/utils/gcal-utils.c
index 995449d2..3bba164f 100644
--- a/src/utils/gcal-utils.c
+++ b/src/utils/gcal-utils.c
@@ -1121,10 +1121,10 @@ filter_event_list_by_uid_and_modtype (GList *widgets,
/* Second pass: find the other related events */
if (event && mod != GCAL_RECURRENCE_MOD_THIS_ONLY)
{
+ g_autofree gchar *id_prefix = NULL;
ECalComponentId *id;
ECalComponent *component;
GcalCalendar *calendar;
- g_autofree gchar *id_prefix;
component = gcal_event_get_component (event);
calendar = gcal_event_get_calendar (event);
diff --git a/src/weather/gcal-weather-service.c b/src/weather/gcal-weather-service.c
index e232d823..1eac8fe5 100644
--- a/src/weather/gcal-weather-service.c
+++ b/src/weather/gcal-weather-service.c
@@ -553,8 +553,8 @@ preprocess_gweather_reports (GcalWeatherService *self,
/* Produce GcalWeatherInfo for each bucket: */
for (i = 0; i < self->max_days; i++)
{
- g_autofree gchar *icon_name;
- g_autofree gchar *temperature;
+ g_autofree gchar *temperature = NULL;
+ g_autofree gchar *icon_name = NULL;
if (compute_weather_info_data (days[i], i == 0, &icon_name, &temperature))
g_ptr_array_add (result, gcal_weather_info_new (&cur_gdate, icon_name, temperature));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]