mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix some warnings
At least the warnings about size potentially being uninitialized seem correct and valid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3affaedb38
commit
80eafb8db7
2 changed files with 5 additions and 4 deletions
|
@ -67,7 +67,7 @@ DiveObjectHelper::DiveObjectHelper(struct dive *d) :
|
||||||
DiveObjectHelper::~DiveObjectHelper()
|
DiveObjectHelper::~DiveObjectHelper()
|
||||||
{
|
{
|
||||||
while (!m_cyls.isEmpty())
|
while (!m_cyls.isEmpty())
|
||||||
delete m_cyls.takeFirst();
|
delete m_cyls.takeFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
int DiveObjectHelper::number() const
|
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++) {
|
for (unsigned long ti = 0; ti < sizeof(tank_info) && tank_info[ti].name != NULL; ti++) {
|
||||||
QString cyl = tank_info[i].name;
|
QString cyl = tank_info[ti].name;
|
||||||
if (cyl == EMPTY_DIVE_STRING)
|
if (cyl == EMPTY_DIVE_STRING)
|
||||||
continue;
|
continue;
|
||||||
cylinders << cyl;
|
cylinders << cyl;
|
||||||
|
|
|
@ -844,7 +844,8 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
|
||||||
// info for first cylinder
|
// info for first cylinder
|
||||||
if (myDive->getCylinder() != cylinder) {
|
if (myDive->getCylinder() != cylinder) {
|
||||||
diveChanged = true;
|
diveChanged = true;
|
||||||
int i, size, wp;
|
unsigned long i;
|
||||||
|
int size = 0, wp = 0;
|
||||||
for (i = 0; i < sizeof(tank_info) && tank_info[i].name != NULL; i++) {
|
for (i = 0; i < sizeof(tank_info) && tank_info[i].name != NULL; i++) {
|
||||||
if (tank_info[i].name == cylinder ) {
|
if (tank_info[i].name == cylinder ) {
|
||||||
if (tank_info[i].ml > 0){
|
if (tank_info[i].ml > 0){
|
||||||
|
|
Loading…
Add table
Reference in a new issue