1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Fix harmless compiler warnings in the readline tab-completion logic of the

command-line shell.

FossilOrigin-Name: 271ca4acfcff448cf863045595d2c2616decd13b6015d7db481c91e2ad5bb92a
This commit is contained in:
drh
2017-07-14 00:28:28 +00:00
parent 33b46eeb35
commit 968d8715fd
4 changed files with 10 additions and 12 deletions

View File

@@ -4266,7 +4266,6 @@ static char *readline_completion_generator(const char *text, int state){
char *zRet;
if( state==0 ){
char *zSql;
int rc;
sqlite3_finalize(pStmt);
zSql = sqlite3_mprintf("SELECT DISTINCT candidate COLLATE nocase"
" FROM completion(%Q) ORDER BY 1", text);
@@ -4274,7 +4273,7 @@ static char *readline_completion_generator(const char *text, int state){
sqlite3_free(zSql);
}
if( sqlite3_step(pStmt)==SQLITE_ROW ){
zRet = strdup(sqlite3_column_text(pStmt, 0));
zRet = strdup((const char*)sqlite3_column_text(pStmt, 0));
}else{
sqlite3_finalize(pStmt);
pStmt = 0;