Lets at least keep the comment in front of the declaration it applies to... (regardless of C89/C99, see r6162)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6164 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-10-15 13:18:51 +00:00
parent ec00337b6c
commit e5183abb69
1 changed files with 3 additions and 2 deletions

View File

@ -297,11 +297,12 @@ static int xAccess(WZ_DECL_UNUSED sqlite3_vfs* pVfs, const char* zName, int flag
*/ */
static int xFullPathname(WZ_DECL_UNUSED sqlite3_vfs* pVfs, const char* zName, int nOut, char* zOut) static int xFullPathname(WZ_DECL_UNUSED sqlite3_vfs* pVfs, const char* zName, int nOut, char* zOut)
{ {
const unsigned int _nOut = nOut;
/* nOut isn't ever negative, because its a buffer length, and the /* nOut isn't ever negative, because its a buffer length, and the
* comparison below would cause a signed/unsigned comparison warning. * comparison below would cause a signed/unsigned comparison warning.
*/ */
const unsigned int _nOut = nOut;
assert(nOut > 0); assert(nOut > 0);
return (strlcpy(zOut, zName, _nOut) < _nOut) ? SQLITE_OK : SQLITE_IOERR; return (strlcpy(zOut, zName, _nOut) < _nOut) ? SQLITE_OK : SQLITE_IOERR;
} }
@ -341,10 +342,10 @@ static int xCurrentTime(WZ_DECL_UNUSED sqlite3_vfs* pVfs, WZ_DECL_UNUSED double*
static int xGetLastError(WZ_DECL_UNUSED sqlite3_vfs* pVfs, int nBuf, char* zBuf) static int xGetLastError(WZ_DECL_UNUSED sqlite3_vfs* pVfs, int nBuf, char* zBuf)
{ {
const unsigned int _nBuf = nBuf;
/* nBuf isn't ever negative, because its a buffer length, and the /* nBuf isn't ever negative, because its a buffer length, and the
* comparison below would cause a signed/unsigned comparison warning. * comparison below would cause a signed/unsigned comparison warning.
*/ */
const unsigned int _nBuf = nBuf;
assert(nBuf > 0); assert(nBuf > 0);
return (strlcpy(zBuf, PHYSFS_getLastError(), _nBuf) < _nBuf) ? SQLITE_OK : SQLITE_IOERR; return (strlcpy(zBuf, PHYSFS_getLastError(), _nBuf) < _nBuf) ? SQLITE_OK : SQLITE_IOERR;