project: Silence CI warnings

This commit is contained in:
Georges Basile Stavracas Neto
2020-10-31 16:55:06 -03:00
parent 06f0c4d011
commit a146b9050d
13 changed files with 35 additions and 25 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ static guint signals[NUM_SIGNALS] = { 0, };
static void static void
update_current_date (GcalClock *self) update_current_date (GcalClock *self)
{ {
g_autoptr (GDateTime) now; g_autoptr (GDateTime) now = NULL;
gboolean minute_changed; gboolean minute_changed;
gboolean hour_changed; gboolean hour_changed;
gboolean day_changed; gboolean day_changed;
@@ -91,7 +91,7 @@ update_current_date (GcalClock *self)
static void static void
schedule_update_timeout (GcalClock *self) schedule_update_timeout (GcalClock *self)
{ {
g_autoptr (GDateTime) now; g_autoptr (GDateTime) now = NULL;
guint seconds_between; guint seconds_between;
/* Remove the previous timeout if we came from resume */ /* Remove the previous timeout if we came from resume */
+4 -2
View File
@@ -451,7 +451,9 @@ update_header (GcalQuickAddPopover *self)
} }
else 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; GcalTimeFormat time_format;
gchar *hour_format; gchar *hour_format;
@@ -475,7 +477,7 @@ update_header (GcalQuickAddPopover *self)
} }
else 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); event_date_name = get_date_string_for_day (self->date_start);
title_date = g_strdup_printf ("%s", event_date_name); title_date = g_strdup_printf ("%s", event_date_name);
} }
+2 -2
View File
@@ -105,7 +105,7 @@ load_weather_settings (GcalWeatherSettings *self)
} }
else else
{ {
g_autoptr (GWeatherLocation) weather_location; g_autoptr (GWeatherLocation) weather_location = NULL;
GWeatherLocation *world; GWeatherLocation *world;
world = gweather_location_get_world (); world = gweather_location_get_world ();
@@ -170,7 +170,7 @@ update_menu_weather_sensitivity (GcalWeatherSettings *self)
static GWeatherLocation* static GWeatherLocation*
get_checked_fixed_location (GcalWeatherSettings *self) 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)); location = gweather_location_entry_get_location (GWEATHER_LOCATION_ENTRY (self->weather_location_entry));
+1 -1
View File
@@ -192,7 +192,7 @@ static GParamSpec* properties[N_PROPS] = { NULL, };
static void static void
update_today_button_sensitive (GcalWindow *window) update_today_button_sensitive (GcalWindow *window)
{ {
g_autoptr (GDateTime) now; g_autoptr (GDateTime) now = NULL;
gboolean sensitive; gboolean sensitive;
GCAL_ENTRY; GCAL_ENTRY;
+2 -2
View File
@@ -81,7 +81,7 @@ static GParamSpec *properties[N_PROPS] = { 0, };
static void static void
update_style_flags (GcalMonthCell *self) update_style_flags (GcalMonthCell *self)
{ {
g_autoptr (GDateTime) today; g_autoptr (GDateTime) today = NULL;
GtkStyleContext *context; GtkStyleContext *context;
GtkStateFlags flags; GtkStateFlags flags;
GtkWidget *widget; GtkWidget *widget;
@@ -261,7 +261,7 @@ gcal_month_cell_drag_drop (GtkWidget *widget,
current_month != start_month || current_month != start_month ||
current_year != start_year) 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); new_start = g_date_time_add_days (start_dt, diff);
+1 -1
View File
@@ -881,7 +881,7 @@ gcal_month_popover_set_date (GcalMonthPopover *self,
if (date) if (date)
{ {
g_autofree gchar *label; g_autofree gchar *label = NULL;
self->date = g_date_time_ref (date); self->date = g_date_time_ref (date);
+1 -1
View File
@@ -1072,7 +1072,7 @@ update_weekday_labels (GcalMonthView *self)
for (i = 0; i < 7; i++) 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); weekday_name = g_utf8_strup (gcal_get_weekday ((i + self->first_weekday) % 7), -1);
+4 -3
View File
@@ -129,7 +129,7 @@ static inline guint
get_event_index (GcalRangeTree *tree, get_event_index (GcalRangeTree *tree,
GcalRange *range) GcalRange *range)
{ {
g_autoptr (GPtrArray) array; g_autoptr (GPtrArray) array = NULL;
gint idx, i; gint idx, i;
i = idx = 0; i = idx = 0;
@@ -342,7 +342,8 @@ gcal_week_grid_unmap (GtkWidget *widget)
static inline gint static inline gint
get_today_column (GcalWeekGrid *self) 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; gint days_diff;
today = g_date_time_new_now_local (); today = g_date_time_new_now_local ();
@@ -486,7 +487,7 @@ gcal_week_grid_draw (GtkWidget *widget,
if (today_column != -1) if (today_column != -1)
{ {
g_autoptr (GDateTime) now; g_autoptr (GDateTime) now = NULL;
GtkBorder margin; GtkBorder margin;
gdouble strip_width; gdouble strip_width;
guint minutes_from_midnight; guint minutes_from_midnight;
+12 -6
View File
@@ -286,7 +286,9 @@ on_button_released (GcalWeekHeader *self,
GdkEventButton *event, GdkEventButton *event,
GtkWidget *widget) 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; GtkWidget *weekview;
gboolean ltr; gboolean ltr;
gdouble column_width; gdouble column_width;
@@ -378,7 +380,8 @@ get_event_by_uuid (GcalWeekHeader *self,
static inline gint static inline gint
get_today_column (GcalWeekHeader *self) 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; gint days_diff;
today = g_date_time_new_now_local (); 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 */ /* Create a new widget after the current widget */
if (create_after) if (create_after)
{ {
g_autoptr (GDateTime) event_end; g_autoptr (GDateTime) event_end = NULL;
GtkWidget *widget_after; GtkWidget *widget_after;
event_end = g_date_time_to_local (gcal_event_widget_get_date_end (GCAL_EVENT_WIDGET (widget))); 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, update_unchanged_events (GcalWeekHeader *self,
GDateTime *new_date) GDateTime *new_date)
{ {
g_autoptr (GDateTime) new_week_start, new_week_end; g_autoptr (GDateTime) new_week_start = NULL;
g_autoptr (GDateTime) utc_week_start, utc_week_end; 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; GList *events_to_update, *l;
gint weekday; gint weekday;
@@ -912,7 +917,8 @@ update_unchanged_events (GcalWeekHeader *self,
for (l = events; l != NULL; l = l->next) 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; GDateTime *week_start, *week_end;
/* /*
+2 -1
View File
@@ -713,7 +713,8 @@ count_events_at_day (GcalYearView *self,
for (i = 0; i < events->len; i++) 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; GcalEvent *event;
event = g_ptr_array_index (events, i); event = g_ptr_array_index (events, i);
+1 -1
View File
@@ -26,7 +26,7 @@ gint
main (gint argc, main (gint argc,
gchar **argv) gchar **argv)
{ {
g_autoptr (GcalApplication) app; g_autoptr (GcalApplication) app = NULL;
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+1 -1
View File
@@ -1121,10 +1121,10 @@ filter_event_list_by_uid_and_modtype (GList *widgets,
/* Second pass: find the other related events */ /* Second pass: find the other related events */
if (event && mod != GCAL_RECURRENCE_MOD_THIS_ONLY) if (event && mod != GCAL_RECURRENCE_MOD_THIS_ONLY)
{ {
g_autofree gchar *id_prefix = NULL;
ECalComponentId *id; ECalComponentId *id;
ECalComponent *component; ECalComponent *component;
GcalCalendar *calendar; GcalCalendar *calendar;
g_autofree gchar *id_prefix;
component = gcal_event_get_component (event); component = gcal_event_get_component (event);
calendar = gcal_event_get_calendar (event); calendar = gcal_event_get_calendar (event);
+2 -2
View File
@@ -553,8 +553,8 @@ preprocess_gweather_reports (GcalWeatherService *self,
/* Produce GcalWeatherInfo for each bucket: */ /* Produce GcalWeatherInfo for each bucket: */
for (i = 0; i < self->max_days; i++) for (i = 0; i < self->max_days; i++)
{ {
g_autofree gchar *icon_name; g_autofree gchar *temperature = NULL;
g_autofree gchar *temperature; g_autofree gchar *icon_name = NULL;
if (compute_weather_info_data (days[i], i == 0, &icon_name, &temperature)) 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)); g_ptr_array_add (result, gcal_weather_info_new (&cur_gdate, icon_name, temperature));