[Olsr-dev] [PATCH v2 2/3] windows: fix warning

Henning Rogge (spam-protected)
Thu May 10 18:58:33 CEST 2012


Strange, I compiled the stable for win32 a few days ago but did not
got this error message... have you added more warnings to your
makefile?

Henning

On Thu, May 10, 2012 at 5:51 PM, Ferry Huberts <(spam-protected)> wrote:
> 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
>
>
> --
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev



-- 
Steven Hawkings about cosmic inflation: "An increase of billions of
billions of percent in a tiny fraction of a second. Of course, that
was before the present government."




More information about the Olsr-dev mailing list