[gnome-control-center] datetime: Fix GCC 4.6 warnings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] datetime: Fix GCC 4.6 warnings
- Date: Wed, 2 Mar 2011 18:03:40 +0000 (UTC)
commit e50563f67c291a1c9a571fd5c22343b1a2667266
Author: Kjartan Maraas <kmaraas gnome org>
Date: Wed Mar 2 18:00:36 2011 +0000
datetime: Fix GCC 4.6 warnings
https://bugzilla.gnome.org/show_bug.cgi?id=642810
panels/datetime/cc-datetime-panel.c | 5 -----
panels/datetime/set-timezone.c | 2 --
panels/datetime/tz.c | 31 -------------------------------
3 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index 52cdfc1..89810a7 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -392,8 +392,6 @@ update_timezone (CcDateTimePanel *self)
{
CcDateTimePanelPrivate *priv = self->priv;
GtkWidget *widget;
- time_t t;
- struct tm *ltime;
gchar **split;
GtkTreeIter iter;
GtkTreeModel *model;
@@ -401,9 +399,6 @@ update_timezone (CcDateTimePanel *self)
/* tz.c updates the local timezone, which means the spin buttons can be
* updated with the current time of the new location */
- t = time (NULL);
- ltime = localtime (&t);
-
split = g_strsplit (priv->current_location->zone, "/", 2);
/* remove underscores */
diff --git a/panels/datetime/set-timezone.c b/panels/datetime/set-timezone.c
index 5aafced..74006bc 100644
--- a/panels/datetime/set-timezone.c
+++ b/panels/datetime/set-timezone.c
@@ -423,7 +423,6 @@ get_system_timezone_async (GetTimezoneFunc callback,
gboolean
get_using_ntp (void)
{
- static gboolean can_use_cache = FALSE;
static gboolean is_using_cache = FALSE;
static time_t last_refreshed = 0;
time_t now;
@@ -450,7 +449,6 @@ get_using_ntp (void)
G_TYPE_BOOLEAN, &cu,
G_TYPE_BOOLEAN, &iu,
G_TYPE_INVALID)) {
- can_use_cache = cu;
is_using_cache = iu;
last_refreshed = now;
}
diff --git a/panels/datetime/tz.c b/panels/datetime/tz.c
index 3e6c8ae..22b948b 100644
--- a/panels/datetime/tz.c
+++ b/panels/datetime/tz.c
@@ -193,37 +193,6 @@ tz_location_get_utc_offset (TzLocation *loc)
return offset;
}
-gint
-tz_location_set_locally (TzLocation *loc)
-{
- time_t curtime;
- struct tm *curzone;
- gboolean is_dst = FALSE;
- gint correction = 0;
-
- g_return_val_if_fail (loc != NULL, 0);
- g_return_val_if_fail (loc->zone != NULL, 0);
-
- curtime = time (NULL);
- curzone = localtime (&curtime);
- is_dst = curzone->tm_isdst;
-
- setenv ("TZ", loc->zone, 1);
-#if 0
- curtime = time (NULL);
- curzone = localtime (&curtime);
-
- if (!is_dst && curzone->tm_isdst) {
- correction = (60 * 60);
- }
- else if (is_dst && !curzone->tm_isdst) {
- correction = 0;
- }
-#endif
-
- return correction;
-}
-
TzInfo *
tz_info_from_location (TzLocation *loc)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]