[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Avoid two "parameter unused" warnings.

From: Jim Meyering
Subject: [PATCH] Avoid two "parameter unused" warnings.
Date: Fri, 08 Feb 2008 17:51:34 +0100

FYI, I've just pushed this.

Normally I don't cater to -W-induced warnings,
but these two (being in a header file) cause more than
their fair share, and the fix is non-invasive, so I've
gone ahead.

        Avoid two "parameter unused" warnings.
        * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
        Mark "st" as used.

diff --git a/lib/stat-time.h b/lib/stat-time.h
index 6b02e4c..8957ab4 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -93,6 +93,8 @@ get_stat_birthtime_ns (struct stat const *st)
   return STAT_TIMESPEC_NS (st, st_birthtim);
 # else
+  /* Avoid a "parameter unused" warning.  */
+  (void) st;
   return 0;
 # endif
@@ -162,6 +164,8 @@ get_stat_birthtime (struct stat const *st)
   /* Birth time is not supported.  Set tv_sec to avoid undefined behavior.  */
   t.tv_sec = -1;
   t.tv_nsec = -1;
+  /* Avoid a "parameter unused" warning.  */
+  (void) st;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]