diff --git a/gnucash/gnome/dialog-fincalc.c b/gnucash/gnome/dialog-fincalc.c index db6c3a5cc1..7db7578dca 100644 --- a/gnucash/gnome/dialog-fincalc.c +++ b/gnucash/gnome/dialog-fincalc.c @@ -93,7 +93,7 @@ static unsigned int periods[] = }; /* This static indicates the debugging module that this .o belongs to. */ -static QofLogModule log_module = GNC_MOD_GUI; +__attribute__((unused)) static QofLogModule log_module = GNC_MOD_GUI; /** Prototypes **********************************************************/ diff --git a/gnucash/gnome/window-autoclear.c b/gnucash/gnome/window-autoclear.c index 4c17cbad1d..2f7f0e33d1 100644 --- a/gnucash/gnome/window-autoclear.c +++ b/gnucash/gnome/window-autoclear.c @@ -37,7 +37,7 @@ #define WINDOW_AUTOCLEAR_CM_CLASS "window-autoclear" -static QofLogModule log_module = GNC_MOD_GUI; +__attribute__((unused)) static QofLogModule log_module = GNC_MOD_GUI; /** STRUCTS *********************************************************/ struct _AutoClearWindow diff --git a/gnucash/gnucash-cli.cpp b/gnucash/gnucash-cli.cpp index e85f252ee1..123ba504d1 100644 --- a/gnucash/gnucash-cli.cpp +++ b/gnucash/gnucash-cli.cpp @@ -45,7 +45,7 @@ namespace bl = boost::locale; /* This static indicates the debugging module that this .o belongs to. */ -static QofLogModule log_module = GNC_MOD_GUI; +[[maybe_unused]] static QofLogModule log_module = GNC_MOD_GUI; namespace Gnucash { diff --git a/gnucash/import-export/aqb/dialog-ab-select-imexporter.c b/gnucash/import-export/aqb/dialog-ab-select-imexporter.c index 73dbb10cdc..8cbdebea66 100644 --- a/gnucash/import-export/aqb/dialog-ab-select-imexporter.c +++ b/gnucash/import-export/aqb/dialog-ab-select-imexporter.c @@ -32,7 +32,7 @@ #include "dialog-ab-select-imexporter.h" #include -static QofLogModule log_module = G_LOG_DOMAIN; +__attribute__((unused)) static QofLogModule log_module = G_LOG_DOMAIN; struct _GncABSelectImExDlg { diff --git a/libgnucash/backend/sql/gnc-budget-sql.cpp b/libgnucash/backend/sql/gnc-budget-sql.cpp index 492eefb3d3..c99025715a 100644 --- a/libgnucash/backend/sql/gnc-budget-sql.cpp +++ b/libgnucash/backend/sql/gnc-budget-sql.cpp @@ -51,7 +51,7 @@ #define AMOUNTS_TABLE "budget_amounts" #define AMOUNTS_TABLE_VERSION 1 -static QofLogModule log_module = G_LOG_DOMAIN; +[[maybe_unused]] static QofLogModule log_module = G_LOG_DOMAIN; #define BUDGET_MAX_NAME_LEN 2048 #define BUDGET_MAX_DESCRIPTION_LEN 2048 diff --git a/libgnucash/backend/sql/gnc-commodity-sql.cpp b/libgnucash/backend/sql/gnc-commodity-sql.cpp index e3383dbe9c..2792f09f8c 100644 --- a/libgnucash/backend/sql/gnc-commodity-sql.cpp +++ b/libgnucash/backend/sql/gnc-commodity-sql.cpp @@ -44,7 +44,7 @@ #include "splint-defs.h" #endif -static QofLogModule log_module = G_LOG_DOMAIN; +[[maybe_unused]] static QofLogModule log_module = G_LOG_DOMAIN; static gpointer get_quote_source_name (gpointer pObject); static void set_quote_source_name (gpointer pObject, gpointer pValue); diff --git a/libgnucash/backend/sql/gnc-order-sql.cpp b/libgnucash/backend/sql/gnc-order-sql.cpp index 3201bf9833..f467bd78ce 100644 --- a/libgnucash/backend/sql/gnc-order-sql.cpp +++ b/libgnucash/backend/sql/gnc-order-sql.cpp @@ -45,7 +45,7 @@ #define _GNC_MOD_NAME GNC_ID_ORDER -static QofLogModule log_module = G_LOG_DOMAIN; +[[maybe_unused]] static QofLogModule log_module = G_LOG_DOMAIN; #define TABLE_NAME "orders" #define TABLE_VERSION 1 diff --git a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp index 7d078e977c..cc58b0f0a3 100644 --- a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp @@ -46,7 +46,7 @@ #include "sixtp-dom-parsers.h" -static const QofLogModule log_module = G_LOG_DOMAIN; +[[maybe_unused]] static const QofLogModule log_module = G_LOG_DOMAIN; const gchar* transaction_version_string = "2.0.0"; static void