From: drh Date: Fri, 14 Jul 2017 00:28:28 +0000 (+0000) Subject: Fix harmless compiler warnings in the readline tab-completion logic of the X-Git-Tag: version-3.20.0~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=968d8715fd26f24048cb2a5f1541fffce90e770d;p=thirdparty%2Fsqlite.git Fix harmless compiler warnings in the readline tab-completion logic of the command-line shell. FossilOrigin-Name: 271ca4acfcff448cf863045595d2c2616decd13b6015d7db481c91e2ad5bb92a --- diff --git a/manifest b/manifest index 70889cb045..4903168287 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improved\sdocumentation\sfor\sthe\snew\ssqlite3_bind_pointer()\sinterface\sand\sits\ncousins. -D 2017-07-13T22:39:15.915 +C Fix\sharmless\scompiler\swarnings\sin\sthe\sreadline\stab-completion\slogic\sof\sthe\ncommand-line\sshell. +D 2017-07-14T00:28:28.380 F Makefile.in 081e48dfe7f995d57ce1a88ddf4d2917b4349158648a6cd45b42beae30de3a12 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 20850e3e8d4d4791e0531955852d768eb06f24138214870d543abb1a47346fba @@ -450,8 +450,8 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384 F src/resolve.c 4324a94573b1e29286f8121e4881db59eaedc014afeb274c8d3e07ed282e0e20 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c 95659b7990e390f9bd8dc30b8975c675fcd1d46e569bc4f5a14e22a8d03e3d14 -F src/shell.c 0401a716fc5343594b8ee60ce065d9a71373d3403f0b81f9fed684741e6401d1 -F src/shell.c.in 98bfdeeb0808418b37f59e6d380568a76e0733efe2494377096f434b39940cad +F src/shell.c e89ad1135cb47c95896a1aec4bd0113af90a057d80f20003f354fa56fc10a616 +F src/shell.c.in dae43a6a43988d955014f070341f296561ea4a43ca2685166a32495b0667ef59 F src/sqlite.h.in 5e12ea31f8b5a01a7328775d114033b96e23c7489bf059cdc0e607e45031f3b6 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 654d76dd288780a460be9c88edc6a5eb2d61df03a7153c92f1d87aba41f73b96 @@ -1631,7 +1631,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 265778142485882f39edfb5756175b2675c1993f0d6395dabbcbbb3767c6ec77 -R 2e83f5e692496d1086cbb1f17d346840 +P 889968bdbf1c258238cb68d82f059e16366c4a40c2d541dd4a1811ab72e693cb +R 7b0c9b69a35f4bfce4439b50c0703b5a U drh -Z caa52445692beb0d01c9428aa87fa426 +Z 975c91c9cb096b239bb5d16f9ce1c990 diff --git a/manifest.uuid b/manifest.uuid index a4399bb0ce..5b33bcf5cf 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -889968bdbf1c258238cb68d82f059e16366c4a40c2d541dd4a1811ab72e693cb \ No newline at end of file +271ca4acfcff448cf863045595d2c2616decd13b6015d7db481c91e2ad5bb92a \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index 4fe0fd3856..45f2a1f022 100644 --- a/src/shell.c +++ b/src/shell.c @@ -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; diff --git a/src/shell.c.in b/src/shell.c.in index 3c57772767..47b0e25561 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -2906,7 +2906,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); @@ -2914,7 +2913,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;