Skip to content

Commit

Permalink
Mark some QofLogModules as potentially unused
Browse files Browse the repository at this point in the history
- __attribute__((unused)) for C
- [[maybe_unused]] for cpp
  • Loading branch information
richardcohen committed Feb 6, 2023
1 parent 9446ae7 commit 4e25bbf
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gnucash/gnome/dialog-fincalc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 **********************************************************/
Expand Down
2 changes: 1 addition & 1 deletion gnucash/gnome/window-autoclear.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gnucash/gnucash-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion gnucash/import-export/aqb/dialog-ab-select-imexporter.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "dialog-ab-select-imexporter.h"
#include <dialog-utils.h>

static QofLogModule log_module = G_LOG_DOMAIN;
__attribute__((unused)) static QofLogModule log_module = G_LOG_DOMAIN;

struct _GncABSelectImExDlg
{
Expand Down
2 changes: 1 addition & 1 deletion libgnucash/backend/sql/gnc-budget-sql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libgnucash/backend/sql/gnc-commodity-sql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libgnucash/backend/sql/gnc-order-sql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e25bbf

Please sign in to comment.