diff options
author | drh <drh@noemail.net> | 2014-02-20 19:23:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-02-20 19:23:15 +0000 |
commit | 4300c1ae3b5464e2a11c20eec3cf1139f161799a (patch) | |
tree | f1776b9211385bf0245dd6c573cb2bacfd118510 /src/alter.c | |
parent | 5655c549aa202c957cf3610d9faa99aac5996475 (diff) | |
download | sqlite-4300c1ae3b5464e2a11c20eec3cf1139f161799a.tar.gz sqlite-4300c1ae3b5464e2a11c20eec3cf1139f161799a.zip |
Make sure that the difference between two string pointers is passed into
sqlite3_mprintf() as type "int".
FossilOrigin-Name: d5d973fedcf5a2eea219f10e11ba3dacdd0593f0
Diffstat (limited to 'src/alter.c')
-rw-r--r-- | src/alter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/alter.c b/src/alter.c index e9f06a9f7..1a83e570d 100644 --- a/src/alter.c +++ b/src/alter.c @@ -77,8 +77,8 @@ static void renameTableFunc( assert( len>0 ); } while( token!=TK_LP && token!=TK_USING ); - zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, - zTableName, tname.z+tname.n); + zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", (int)(((u8*)tname.z) - zSql), + zSql, zTableName, tname.z+tname.n); sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC); } } @@ -130,7 +130,7 @@ static void renameParentFunc( sqlite3Dequote(zParent); if( 0==sqlite3StrICmp((const char *)zOld, zParent) ){ char *zOut = sqlite3MPrintf(db, "%s%.*s\"%w\"", - (zOutput?zOutput:""), z-zInput, zInput, (const char *)zNew + (zOutput?zOutput:""), (int)(z-zInput), zInput, (const char *)zNew ); sqlite3DbFree(db, zOutput); zOutput = zOut; @@ -216,8 +216,8 @@ static void renameTriggerFunc( /* Variable tname now contains the token that is the old table-name ** in the CREATE TRIGGER statement. */ - zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, - zTableName, tname.z+tname.n); + zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", (int)(((u8*)tname.z) - zSql), + zSql, zTableName, tname.z+tname.n); sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC); } } |