1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-20 17:17:13 +02:00

Supress some fall through warnings in GCC with markers. Later to be updated to attributes and include support for more compilers.

This commit is contained in:
Sandu Liviu Catalin
2019-05-24 22:17:24 +03:00
parent 68e00bce02
commit ef0fc103cd
5 changed files with 40 additions and 0 deletions

View File

@ -236,9 +236,13 @@ Int32 Statement::Exec()
{
// We don't expect any rows to be returned in this case!
case SQLITE_ROW: STHROWF("Results were found");
// fall through
case SQLITE_BUSY: STHROWF("Database was busy");
// fall through
case SQLITE_ERROR: STHROWF("Runtime error occurred");
// fall through
case SQLITE_MISUSE: STHROWF("Statement misuse");
// fall through
default: STHROWF("Unknown failure [%s]", m_Handle->ErrStr());
}
// Operation failed (shouldn't reach this point!)
@ -277,8 +281,11 @@ bool Statement::Step()
switch (m_Handle->mStatus)
{
case SQLITE_BUSY: STHROWF("Database was busy");
// fall through
case SQLITE_ERROR: STHROWF("Runtime error occurred");
// fall through
case SQLITE_MISUSE: STHROWF("Statement misuse");
// fall through
default: STHROWF("Unknown failure [%s]", m_Handle->ErrStr());
}
// Operation failed (shouldn't reach this point!)