[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 3a66260: Suppress two unused variables

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 3a66260: Suppress two unused variables
Date: Tue, 26 Oct 2021 09:59:14 -0400 (EDT)

branch: master
commit 3a66260de5a6576458026a2409a3f5f38f68a84b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Suppress two unused variables
    The four formats /f[1-4]/ are all used in static_formats(). Some
    special columns are added in Ledger::make_evaluator(), along with
    their formats, but only two of the four formats are actually used
    there at present; commented the other two out.
 configure.ac         | 4 ----
 ledger_evaluator.cpp | 4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4aa7d77..f03ac76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -546,10 +546,6 @@ if test "x$GXX" == "xyes"; then
-    dnl This warning is now only given for 2 variables in ledger_evaluator.cpp
-    dnl and should be fixed there and reenabled.
-    LMI_CXX_ADD_IF_SUPPORTED(-Wno-unused-variable)
 dnl === Generate output files ===
diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index 60b8147..40a6830 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -685,9 +685,9 @@ ledger_evaluator Ledger::make_evaluator() const
     mask_map_t mask_map {static_masks()};
     std::pair<int,oenum_format_style> f1(0, oe_format_normal);
-    std::pair<int,oenum_format_style> f2(2, oe_format_normal);
+//  std::pair<int,oenum_format_style> f2(2, oe_format_normal);     // not used
     std::pair<int,oenum_format_style> f3(0, oe_format_percentage);
-    std::pair<int,oenum_format_style> f4(2, oe_format_percentage);
+//  std::pair<int,oenum_format_style> f4(2, oe_format_percentage); // not used
     format_map_t format_map {static_formats()};

reply via email to

[Prev in Thread] Current Thread [Next in Thread]