From 29ef2f0e31894a21cef541ba377cf703ec249c3d Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Fri, 25 Oct 2013 01:10:07 +0000 Subject: [PATCH] Queisce quite a few clang warnings -Wdangling-else due to this work around for compiling gperf under Visual Studio from 1998. ref. http://msdn.microsoft.com/en-us/library/b80153d8%28v=vs.90%29.aspx ref. http://stackoverflow.com/questions/984878/what-is-the-possible-use-for-define-for-if-false-else-for --- contrib/gperf/src/search.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/gperf/src/search.cc b/contrib/gperf/src/search.cc index c2459701036d..956b5bed07bc 100644 --- a/contrib/gperf/src/search.cc +++ b/contrib/gperf/src/search.cc @@ -36,7 +36,10 @@ /* ============================== Portability ============================== */ /* Assume ISO C++ 'for' scoping rule. */ -#define for if (0) ; else for +/* This code is used to work around scoping issues with visual studio 6 from + * 1998. Comment it out here to queisce numerous -Wdangling-else warnings + * from clang. +#define for if (0) ; else for */ /* Dynamically allocated array with dynamic extent: