From 9b6bb9b47153e4bf6d23bef13165491ba440fc23 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Fri, 26 Sep 2014 02:55:38 +0200 Subject: [PATCH] Define META_FREE in a way that doesn't cause -Wempty-body warnings. That get rids of the only -Wempty-body warning when compiling postgres with gcc 4.8/9. As 6550b901f shows, it's useful to be able to use that option routinely. Without asserts there's many more warnings, but that's food for another commit. --- contrib/fuzzystrmatch/dmetaphone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c index 5001288bb6..c8f5f32fbb 100644 --- a/contrib/fuzzystrmatch/dmetaphone.c +++ b/contrib/fuzzystrmatch/dmetaphone.c @@ -195,7 +195,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS) * in a case like this. */ -#define META_FREE(x) /* pfree((x)) */ +#define META_FREE(x) ((void)true) /* pfree((x)) */ #else /* not defined DMETAPHONE_MAIN */ /* use the standard malloc library when not running in PostgreSQL */ -- 2.40.0