[Olsr-dev] [PATCH v2 2/3] windows: fix warning
Ferry Huberts
(spam-protected)
Thu May 10 17:51:16 CEST 2012
From: Ferry Huberts <(spam-protected)>
src/main.c: In function 'olsr_create_lock_file':
src/main.c:132:17: error: variable 'lock' set but not used [-Werror=unused-but-set-variable]
Signed-off-by: Ferry Huberts <(spam-protected)>
---
src/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 230c462..9aae84f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -129,7 +129,7 @@ struct olsr_cookie_info *def_timer_ci = NULL;
static int olsr_create_lock_file(bool noExitOnFail) {
#ifdef WIN32
bool success;
- HANDLE lck, lock;
+ HANDLE lck;
lck = CreateFile(lock_file_name,
GENERIC_READ | GENERIC_WRITE,
@@ -139,7 +139,7 @@ static int olsr_create_lock_file(bool noExitOnFail) {
FILE_ATTRIBUTE_NORMAL |
FILE_FLAG_DELETE_ON_CLOSE,
NULL);
- lock = CreateEvent(NULL, TRUE, FALSE, lock_file_name);
+ CreateEvent(NULL, TRUE, FALSE, lock_file_name);
if (INVALID_HANDLE_VALUE == lck || ERROR_ALREADY_EXISTS == GetLastError()) {
if (noExitOnFail) {
return -1;
--
1.7.7.6
More information about the Olsr-dev
mailing list