From 233ec511db140990bbaff622f8edd9f5d28f7399 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 28 May 2010 09:45:17 +0200 Subject: lib: eliminate 'statement not reached' warnings --- lib/curl_fnmatch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/curl_fnmatch.c') diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c index 410938a29..6485c97bb 100644 --- a/lib/curl_fnmatch.c +++ b/lib/curl_fnmatch.c @@ -280,7 +280,10 @@ static int setcharset(unsigned char **p, unsigned char *charset) state = CURLFNM_SCHS_DEFAULT; } else - return SETCHARSET_FAIL; + /* used 'goto fail' instead of 'return SETCHARSET_FAIL' to avoid a + * nonsense warning 'statement not reached' at end of the fnc when + * compiling on Solaris */ + goto fail; break; case CURLFNM_SCHS_RIGHTBRLEFTBR: if(c == ']') { @@ -294,6 +297,7 @@ static int setcharset(unsigned char **p, unsigned char *charset) break; } } +fail: return SETCHARSET_FAIL; } -- cgit v1.2.3