summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-03-08 19:04:24 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-03-10 23:25:31 -0700
commitd4e02a09258063c6d024c3ccd42d6b22212e6e18 (patch)
treec97d8ec830dac61f2b85665f457a519642d0c974
parent7606a46b922dfdb0627f1af6ab1432ae88c79d66 (diff)
Initialize nMatch even if WIN32 is defined
Flagged by cppcheck 1.64: Checking app/xkbcomp/listing.c: WIN32... [app/xkbcomp/listing.c:335]: (error) Uninitialized variable: nMatch Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--listing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listing.c b/listing.c
index c7f5ef8..945f7f6 100644
--- a/listing.c
+++ b/listing.c
@@ -292,8 +292,8 @@ AddDirectory(char *head, char *ptrn, char *rest, char *map)
#else
if ((dirp = opendir((head ? head : "."))) == NULL)
return 0;
- nMatch = 0;
#endif
+ nMatch = 0;
#ifdef WIN32
do
#else