diff src/editfns.c @ 5762:427a72c6ee17

Eliminate several compiler (clang) warnings.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sun, 15 Sep 2013 23:47:37 +0900
parents aa5f38ecb804
children 36dddf9d90d1
line wrap: on
line diff
--- a/src/editfns.c	Sun Sep 08 21:48:09 2013 +0200
+++ b/src/editfns.c	Sun Sep 15 23:47:37 2013 +0900
@@ -1168,7 +1168,7 @@
   CHECK_FIXNUM (*args); tm.tm_hour = XFIXNUM (*args++);	/* hour */
   CHECK_FIXNUM (*args); tm.tm_mday = XFIXNUM (*args++);	/* day */
   CHECK_FIXNUM (*args); tm.tm_mon  = XFIXNUM (*args++) - 1;	/* month */
-  CHECK_FIXNUM (*args); tm.tm_year = XFIXNUM (*args++) - 1900;/* year */
+  CHECK_FIXNUM (*args); tm.tm_year = XFIXNUM (*args++) - 1900;	/* year */
 
   tm.tm_isdst = -1;
 
@@ -1190,7 +1190,9 @@
       else if (FIXNUMP (zone))
 	{
 	  int abszone = abs (XFIXNUM (zone));
-	  sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XFIXNUM (zone) < 0),
+	  /* #### I have no idea what this conforms to,
+	     but the compiler has stopped whining. */
+	  sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ? "-" : "+",
 		   abszone / (60*60), (abszone/60) % 60, abszone % 60);
 	  tzstring = tzbuf;
 	}