From e6817033d3fc9ef7451feb1918457a9e1f8fbe59 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 11 May 2014 17:39:44 +0000 Subject: [PATCH] TW-1321 - TW-1321 Unit test view.t fails oddly on Ubuntu 13.10 (thanks to John West). --- ChangeLog | 1 + src/ViewTask.cpp | 4 ++-- src/ViewText.cpp | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index be5d973fb..80371294f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,7 @@ to Onion). - TW-1320 Provide output of malformed row if invalid Taskwarrior file format (thanks to Kosta Harlan). +- TW-1321 Unit test view.t fails oddly on Ubuntu 13.10 (thanks to John West). - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. - Removed deprecated 'edit.verbose' setting, in favor of the 'edit' verbosity diff --git a/src/ViewTask.cpp b/src/ViewTask.cpp index a85e46220..096ec4666 100644 --- a/src/ViewTask.cpp +++ b/src/ViewTask.cpp @@ -136,8 +136,8 @@ std::string ViewTask::render (std::vector & data, std::vector & seque break; // Determine minimum and ideal width for this column. - unsigned int min; - unsigned int ideal; + unsigned int min = 0; + unsigned int ideal = 0; (*i)->measure (data[sequence[s]], min, ideal); if (min > global_min) global_min = min; diff --git a/src/ViewText.cpp b/src/ViewText.cpp index 3fa211948..c25464aa0 100644 --- a/src/ViewText.cpp +++ b/src/ViewText.cpp @@ -126,8 +126,8 @@ std::string ViewText::render () for (unsigned int row = 0; row < _data.size (); ++row) { // Determine minimum and ideal width for this column. - unsigned int min; - unsigned int ideal; + unsigned int min = 0; + unsigned int ideal = 0; _columns[col]->measure (_data[row][col], min, ideal); if (min > global_min) global_min = min;