Discussion:
[PATCH] stat-time: avoid unused-parameter warning
Add Reply
Bernhard Voelker
2017-12-29 17:33:51 UTC
Reply
Permalink
Raw Message
GCC-7.2.1 complains:
../gl/lib/stat-time.h:215:47: error: unused parameter 'st' \
[-Werror=unused-parameter]
stat_time_normalize (int result, struct stat *st)
^~

* lib/stat-time.h (stat_time_normalize): Silence compiler regarding
the unused parameter ST.
---
ChangeLog | 11 +++++++++++
lib/stat-time.h | 2 ++
2 files changed, 13 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 213a45362..94dd234ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-12-29 Bernhard Voelker <***@bernhard-voelker.de>
+
+ stat-time: avoid unused-parameter warning
+ GCC-7.2.1 complains:
+ ../gl/lib/stat-time.h:215:47: error: unused parameter 'st' \
+ [-Werror=unused-parameter]
+ stat_time_normalize (int result, struct stat *st)
+ ^~
+ * lib/stat-time.h (stat_time_normalize): Silence compiler regarding
+ the unused parameter ST.
+
2017-12-29 Samuel Thibault <***@gnu.org>

Add cross-compilation results for GNU/Hurd.
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 1cf821992..48ed9204a 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -243,6 +243,8 @@ stat_time_normalize (int result, struct stat *st)
}
}
}
+#else
+ (void) st;
#endif
return result;
}
--
2.15.1
Paul Eggert
2017-12-29 18:01:09 UTC
Reply
Permalink
Raw Message
Thanks, but -Wunused-parameter issues so many false alarms that I think I'd
rather just ask people to compile with -Wno-unused-parameter. That's what
coreutils does, and Emacs, and so forth.
Bernhard Voelker
2017-12-30 00:06:11 UTC
Reply
Permalink
Raw Message
Post by Paul Eggert
Thanks, but -Wunused-parameter issues so many false alarms that I think I'd
rather just ask people to compile with -Wno-unused-parameter. That's what
coreutils does, and Emacs, and so forth.
Okay, thanks.

Have a nice day,
Berny

Loading...