>From 4ed77a0fbcdecb3000547c54ef11cf31a2b97be3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Sep 2015 23:06:58 +0200 Subject: [PATCH 1/3] Make bool variable volatile to avoid unused variable warning Use "volatile" for variables which only exist to force calling set_alert_functions() to avoid -Wunused-variable warning from g++ 5.2. --- alert_cgi.cpp | 2 +- alert_cli.cpp | 2 +- alert_wx.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alert_cgi.cpp b/alert_cgi.cpp index ce6c971..3d8926e 100644 --- a/alert_cgi.cpp +++ b/alert_cgi.cpp @@ -33,7 +33,7 @@ namespace { - bool ensure_setup = set_alert_functions + bool volatile ensure_setup = set_alert_functions (status_alert ,warning_alert ,hobsons_choice_alert diff --git a/alert_cli.cpp b/alert_cli.cpp index 1c331fd..4c7aa63 100644 --- a/alert_cli.cpp +++ b/alert_cli.cpp @@ -38,7 +38,7 @@ namespace { - bool ensure_setup = set_alert_functions + bool volatile ensure_setup = set_alert_functions (status_alert ,warning_alert ,hobsons_choice_alert diff --git a/alert_wx.cpp b/alert_wx.cpp index 0c7ada0..c18f89b 100644 --- a/alert_wx.cpp +++ b/alert_wx.cpp @@ -42,7 +42,7 @@ namespace { -bool ensure_setup = set_alert_functions +bool volatile ensure_setup = set_alert_functions (status_alert ,warning_alert ,hobsons_choice_alert -- 2.1.0