From 74c385e702645b70f230c13b9f5bbc3acc76d367 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 12 Jun 2009 10:46:16 -0400 Subject: COMP: Avoid double-initialization in KWSys String The KWSys String implementation of strcasecmp initialized 'result' immediately before assigning to it. Borland produces a warning in this case, so this commit removes the extra initialization. --- Source/kwsys/String.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/kwsys/String.c b/Source/kwsys/String.c index 9d2afc6..c4421cc 100644 --- a/Source/kwsys/String.c +++ b/Source/kwsys/String.c @@ -86,7 +86,7 @@ int kwsysString_strcasecmp(const char* lhs, const char* rhs) const char* const lower = kwsysString_strcasecmp_tolower; unsigned char const* us1 = (unsigned char const*)lhs; unsigned char const* us2 = (unsigned char const*)rhs; - int result = 0; + int result; while((result = lower[*us1] - lower[*us2++], result == 0) && *us1++) { } -- cgit v0.12