Package: ledger Version: 2.6.2-1
Hi! After recent archive rebuild in Ubuntu we discovered that ledger FTBFS because of new gcc4.4. Attached is a patch to fix the issue (Inline patch though). Regards, Stefan
--- ledger-2.6.2.orig/gnucash.cc +++ ledger-2.6.2/gnucash.cc @@ -201,7 +201,7 @@ { const char * num = number.c_str(); - if (char * p = std::strchr(num, '/')) { + if (const char * p = std::strchr(num, '/')) { std::string numer_str(num, p - num); std::string denom_str(p + 1); only in patch2: unchanged: --- ledger-2.6.2.orig/textual.cc +++ ledger-2.6.2/textual.cc @@ -298,8 +298,8 @@ DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " << "Parsed a note '" << xact->note << "'"); - if (char * b = std::strchr(xact->note.c_str(), '[')) - if (char * e = std::strchr(xact->note.c_str(), ']')) { + if (const char * b = std::strchr(xact->note.c_str(), '[')) + if (const char * e = std::strchr(xact->note.c_str(), ']')) { char buf[256]; std::strncpy(buf, b + 1, e - b - 1); buf[e - b - 1] = '\0'; only in patch2: unchanged: --- ledger-2.6.2.orig/option.cc +++ ledger-2.6.2/option.cc @@ -892,7 +892,7 @@ namespace { void parse_price_setting(const char * optarg) { - char * equals = std::strchr(optarg, '='); + const char * equals = std::strchr(optarg, '='); if (! equals) return;