git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] khash: silence -Wunused-function
@ 2018-10-23 11:34 Carlo Marcelo Arenas Belón
  2018-10-23 15:44 ` Duy Nguyen
  2018-10-23 16:19 ` [PATCH] khash: silence -Wunused-function René Scharfe
  0 siblings, 2 replies; 9+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2018-10-23 11:34 UTC (permalink / raw)
  To: git; +Cc: peff, Carlo Marcelo Arenas Belón

after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18)
macro generated code should use a similar solution than commit-slab to
silence the compiler.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 khash.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/khash.h b/khash.h
index d10caa0c35..39c2833877 100644
--- a/khash.h
+++ b/khash.h
@@ -234,7 +234,7 @@ static const double __ac_HASH_UPPER = 0.77;
 	__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
 
 #define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
-	KHASH_INIT2(name, static inline, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
+	KHASH_INIT2(name, __attribute__((__unused__)) static inline, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
 
 /* Other convenient macros... */
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-23 23:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 11:34 [PATCH] khash: silence -Wunused-function Carlo Marcelo Arenas Belón
2018-10-23 15:44 ` Duy Nguyen
2018-10-23 21:50   ` [PATCH v2 0/2] delta-islands: avoid unused function messages Carlo Marcelo Arenas Belón
2018-10-23 21:50     ` [PATCH v2 1/2] commit-slabs: move MAYBE_UNUSED out Carlo Marcelo Arenas Belón
2018-10-23 22:00       ` Jeff King
2018-10-23 23:02         ` Carlo Arenas
2018-10-23 21:50     ` [PATCH v2 2/2] khash: silence -Wunused-function for delta-islands Carlo Marcelo Arenas Belón
2018-10-23 16:19 ` [PATCH] khash: silence -Wunused-function René Scharfe
2018-10-23 16:52   ` Carlo Arenas

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).