From 6f2adf7598cfeef60b90ecf1bcfb927c8e077a72 Mon Sep 17 00:00:00 2001
From: zab <zab>
Date: Tue, 20 Apr 2004 21:37:27 +0000
Subject: [PATCH] - shut up, shut up, shut up, shut up!

---
 lustre/tests/stat.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lustre/tests/stat.c b/lustre/tests/stat.c
index 4ef6bbe34c..4d99771624 100644
--- a/lustre/tests/stat.c
+++ b/lustre/tests/stat.c
@@ -290,12 +290,21 @@ void print_human_access(struct stat *statbuf)
     printf (access);
 }
 
+/* trick gcc into being unable to recognize the %c format so it doesn't
+ * issue its inane warning about %c and two-digit year representations. */
+static size_t strftime_wrapper(char *s, size_t max, const char *fmt,
+				struct tm *tm) {
+	return strftime(s, max, fmt, tm);
+}
+
 void print_human_time(time_t *t)
 {
   char str[40];
   
-  if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
-  else printf("Cannot calculate human readable time, sorry");
+  if (strftime_wrapper(str, 40, "%c", localtime(t)) > 0) 
+	  printf(str);
+  else 
+	  printf("Cannot calculate human readable time, sorry");
 }
 
 /* print statfs info */
-- 
GitLab