From 80eafb8db78526ea2f18295aa435e6d251b67648 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 4 Sep 2016 10:27:56 -0700 Subject: Fix some warnings At least the warnings about size potentially being uninitialized seem correct and valid. Signed-off-by: Dirk Hohndel --- core/subsurface-qt/DiveObjectHelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index ab95b0c57..37f954cb7 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -67,7 +67,7 @@ DiveObjectHelper::DiveObjectHelper(struct dive *d) : DiveObjectHelper::~DiveObjectHelper() { while (!m_cyls.isEmpty()) - delete m_cyls.takeFirst(); + delete m_cyls.takeFirst(); } int DiveObjectHelper::number() const @@ -267,8 +267,8 @@ QStringList DiveObjectHelper::cylinderList() const } } - for (i = 0; i < sizeof(tank_info) && tank_info[i].name != NULL; i++) { - QString cyl = tank_info[i].name; + for (unsigned long ti = 0; ti < sizeof(tank_info) && tank_info[ti].name != NULL; ti++) { + QString cyl = tank_info[ti].name; if (cyl == EMPTY_DIVE_STRING) continue; cylinders << cyl; -- cgit v1.2.3-70-g09d2