Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > f0319e7b74ee3ce0a343c868b5672e38 > files > 1

libopensync-0.22-3.mga2.src.rpm

diff -up libopensync-0.22/opensync/opensync_time.c.unusedvar libopensync-0.22/opensync/opensync_time.c
--- libopensync-0.22/opensync/opensync_time.c.unusedvar	2007-03-27 13:49:18.000000000 +0200
+++ libopensync-0.22/opensync/opensync_time.c	2011-02-22 22:02:52.000000000 +0100
@@ -889,16 +889,21 @@ osync_bool osync_time_isdst(const char *
 	osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, vtime, tzid);
 
 	int year;
+    /* KH: Fails with -Werror=unused-but-set-variable as newyear and newyear_t aren't used anywhere
 	char *newyear = NULL;
 	time_t newyear_t, timestamp;
+    */
+	time_t timestamp;
 	struct tm *std_changetime, *dst_changetime;
 	time_t dstStamp, stdStamp;
 	xmlNode *current = NULL;
 
 	sscanf(vtime, "%4d%*2d%*2dT%*2d%*d%*2d%*c", &year);
 
+    /* KH: See comment above
 	newyear = g_strdup_printf("%4d0101T000000", year);
 	newyear_t = osync_time_vtime2unix(newyear, 0);
+    */
 	timestamp = osync_time_vtime2unix(vtime, 0);
 
 	/* Handle XML Timezone field */
--- libopensync-0.22/tools/osynctest.c	2007-03-27 11:49:19.000000000 +0000
+++ libopensync-0.22_/tools/osynctest.c	2011-02-22 22:36:06.959567053 +0000
@@ -81,8 +81,10 @@
 double _second()     /* note that some compilers like AIX xlf do not require the trailing  '_' */
 {
     struct timeval tp;
+    /* KH: Fails with -Werror=unused-but-set-variable as rtn isn't used anywhere
     int rtn;
     rtn=gettimeofday(&tp, NULL);
+    */
 
     return ((double)tp.tv_sec+(1.e-6)*tp.tv_usec);
 }