From 7d5f6c551a2fef5ec4940bf6a5e2a4844b88df4d Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Jul 2016 12:01:58 +0100 Subject: [PATCH] Fix unused variable warning and assumed buffer size from last merge. --- driver/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/main.c b/driver/main.c index cae029a98..9f68d0d9e 100644 --- a/driver/main.c +++ b/driver/main.c @@ -847,14 +847,14 @@ int main(int argc, char **argv) turning the last two \ characters to null. Then we append the lib\ivl$(suffix) to finish. */ char *s; - char tmppath[MAXSIZE]; #ifdef __MINGW32__ + char tmppath[MAXSIZE]; GetModuleFileName(NULL, tmppath, sizeof tmppath); /* Convert to a short name to remove any embedded spaces. */ GetShortPathName(tmppath, ivl_root, sizeof ivl_root); #else if (access("/proc/self/exe", F_OK) != -1) { - readlink("/proc/self/exe", ivl_root, MAXSIZE); + readlink("/proc/self/exe", ivl_root, sizeof ivl_root); } else { /* In a UNIX environment, if /proc/self/exe does not exist, the IVL_ROOT from the Makefile is