Loading...
stdtime/FreeBSD/strftime.c Libc-825.26 Libc-1669.40.2
--- Libc/Libc-825.26/stdtime/FreeBSD/strftime.c
+++ Libc/Libc-1669.40.2/stdtime/FreeBSD/strftime.c
@@ -15,15 +15,16 @@
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#ifndef lint
-#ifndef NOID
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunreachable-code"
+
+#if 0
 static const char	elsieid[] = "@(#)strftime.3	8.3";
 /*
 ** Based on the UCB version with the ID appearing below.
 ** This is ANSIish only when "multibyte character == plain character".
 */
-#endif /* !defined NOID */
-#endif /* !defined lint */
+#endif
 
 #include "xlocale_private.h"
 
@@ -53,7 +54,7 @@
 			int *, struct lc_time_T *, locale_t);
 
 extern char *	tzname[];
-__private_extern__ long __darwin_altzone;		/* DST timezone offset */
+extern long __darwin_altzone;		/* DST timezone offset */
 #define altzone __darwin_altzone
 __private_extern__ long _st_get_timezone(void);
 
@@ -72,7 +73,7 @@
 #define PAD_ZERO	3
 
 #ifndef BUILDING_VARIANT
-static const char* fmt_padding[][4] = {
+static const char * const fmt_padding[][4] = {
 	/* DEFAULT,	LESS,	SPACE,	ZERO */
 #define PAD_FMT_MONTHDAY	0
 #define PAD_FMT_HMS		0
@@ -137,14 +138,8 @@
 
 #ifndef BUILDING_VARIANT
 __private_extern__ char *
-_fmt(format, t, pt, ptlim, warnp, tptr, loc)
-const char *		format;
-const struct tm * const	t;
-char *			pt;
-const char * const	ptlim;
-int *			warnp;
-struct lc_time_T *	tptr;
-locale_t		loc;
+_fmt(const char *format, const struct tm * const t, char *pt,
+    const char * const ptlim, int *warnp, struct lc_time_T *tptr, locale_t loc)
 {
 	int Ealternative, Oalternative, PadIndex;
 
@@ -593,12 +588,8 @@
 }
 
 static char *
-_conv(n, format, pt, ptlim, loc)
-const int		n;
-const char * const	format;
-char * const		pt;
-const char * const	ptlim;
-locale_t		loc;
+_conv(const int n, const char * const format, char * const pt,
+    const char * const ptlim, locale_t loc)
 {
 	char	buf[INT_STRLEN_MAXIMUM(int) + 1];
 
@@ -607,10 +598,7 @@
 }
 
 static char *
-_add(str, pt, ptlim)
-const char *		str;
-char *			pt;
-const char * const	ptlim;
+_add(const char * str, char * pt, const char * const ptlim)
 {
 	while (pt < ptlim && (*pt = *str++) != '\0')
 		++pt;
@@ -626,14 +614,8 @@
 */
 
 static char *
-_yconv(a, b, convert_top, convert_yy, pt, ptlim, loc)
-const int		a;
-const int		b;
-const int		convert_top;
-const int		convert_yy;
-char *			pt;
-const char * const	ptlim;
-locale_t		loc;
+_yconv(const int a, const int b, const int convert_top, const int convert_yy,
+    char * pt, const char * const ptlim, locale_t loc)
 {
 	register int	lead;
 	register int	trail;
@@ -659,3 +641,4 @@
 	return pt;
 }
 #endif /* !BUILDING_VARIANT */
+#pragma clang diagnostic pop