summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2019-06-25 18:11:45 +0800
committerzhuyaliang <[email protected]>2019-06-25 18:11:45 +0800
commit2bccfe30196b7d2c0f11b9e789e10705f97e56a5 (patch)
tree3cb6fa4370da094304815b9640434b480f938d72 /capplets
parentdcadc0ec7ce7ec5a7f4b42a6b07ee76922ba5569 (diff)
downloadmate-control-center-2bccfe30196b7d2c0f11b9e789e10705f97e56a5.tar.bz2
mate-control-center-2bccfe30196b7d2c0f11b9e789e10705f97e56a5.tar.xz
Remove compilation warnings
Diffstat (limited to 'capplets')
-rw-r--r--capplets/time-admin/src/main.c2
-rw-r--r--capplets/time-admin/src/time-zone.c8
-rw-r--r--capplets/time-admin/src/time-zone.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c
index 6a2f2028..721f0157 100644
--- a/capplets/time-admin/src/main.c
+++ b/capplets/time-admin/src/main.c
@@ -44,7 +44,7 @@ static void update_apply_timeout(TimeAdmin *ta)
ta->ApplyId = g_timeout_add (10000, (GSourceFunc)CheckClockHealth,ta);
}
static void ChangeTimeValue(GtkSpinButton *spin_button,
- gpointer *data)
+ gpointer data)
{
TimeAdmin *ta = (TimeAdmin *)data;
if(TimeoutFlag == 0)
diff --git a/capplets/time-admin/src/time-zone.c b/capplets/time-admin/src/time-zone.c
index 7cb90e62..e6106f1b 100644
--- a/capplets/time-admin/src/time-zone.c
+++ b/capplets/time-admin/src/time-zone.c
@@ -345,13 +345,13 @@ static void LoadCities (TzLocation *loc,
static void CreateCityList(TimeAdmin *ta)
{
- g_autoptr(TzDB) db = NULL;
-
+ TzDB *db;
ta->CityListStore = gtk_list_store_new (CITY_NUM_COLS,G_TYPE_STRING,G_TYPE_STRING);
db = tz_load_db ();
g_ptr_array_foreach (db->locations, (GFunc) LoadCities, ta->CityListStore);
+ TimeZoneDateBaseFree(db);
}
static GtkWidget *CreateZoneFrame(TimeAdmin *ta)
{
@@ -641,11 +641,13 @@ TzInfo *tz_info_from_location (TzLocation *loc)
}
glong tz_location_get_utc_offset (TzLocation *loc)
{
- g_autoptr(TzInfo) tz_info = NULL;
+ TzInfo *tz_info;
glong offset;
tz_info = tz_info_from_location (loc);
offset = tz_info->utc_offset;
+ tz_info_free (tz_info);
+
return offset;
}
void RunTimeZoneDialog (GtkButton *button,
diff --git a/capplets/time-admin/src/time-zone.h b/capplets/time-admin/src/time-zone.h
index fe3a8eb2..d1cd0b9c 100644
--- a/capplets/time-admin/src/time-zone.h
+++ b/capplets/time-admin/src/time-zone.h
@@ -79,7 +79,6 @@ char *tz_info_get_clean_name (TzDB *tz_db,
void tz_info_free (TzInfo *tzinfo);
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (TzDB, TimeZoneDateBaseFree)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TzInfo, tz_info_free)
#endif