From: drh <> Date: Fri, 22 Nov 2024 12:29:35 +0000 (+0000) Subject: Fix harmless scanbuild warnings caused by the introduction of the X-Git-Tag: major-relase~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed271dc7ea87ae7e7950b917c00fb02f1afaf141;p=thirdparty%2Fsqlite.git Fix harmless scanbuild warnings caused by the introduction of the ".dbtotxt" command into the CLI by check-in [b43acf5a8cd4a5ef]. FossilOrigin-Name: 554d8fbd865436ace900859874b6c8c7e1b782184158a86b7788644e27bd1997 --- diff --git a/manifest b/manifest index fceac6cb5c..0120709f77 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\ssome\sharmless\sscanbuild\swarnings\sin\sthe\sshell. -D 2024-11-22T12:07:21.302 +C Fix\sharmless\sscanbuild\swarnings\scaused\sby\sthe\sintroduction\sof\sthe\n".dbtotxt"\scommand\sinto\sthe\sCLI\sby\scheck-in\s[b43acf5a8cd4a5ef]. +D 2024-11-22T12:29:35.356 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -775,7 +775,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 4b14337a2742f0c0beeba490e9a05507e9b4b12184b9cd12773501d08d48e3fe -F src/shell.c.in f75bc23ace1ab3ee7ab05a1c09f8733deb6b3885f6c0c83b506e021c03be95ce +F src/shell.c.in 7aa68b305246391984c48f10725416079394a64bf0349fa4087d835c41ef733d F src/sqlite.h.in 4d93768709c53b7c653a63817a82d5a8625264ca0d8cdf99967ba147bdcf2aa6 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54 @@ -2199,8 +2199,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 063690d2c5cc2a887055b9141d3fcdb4fd2fa35d069c9a39b81903c531c73fcf -R 13b3d4e078b262611ab19f5afe7794a7 +P 9ba1c9b505d459366274043c1c5327f1a9d4e15d3564d99f8a15926af1d6d247 +R 0f0539622ac4b0da7137e3fd709352f4 U drh -Z dd389eddd9f1b1e329be94b3f99fecab +Z 816c51d5e78086444b5f5aa51a7c35b5 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 5209cb273a..53dbfc820e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9ba1c9b505d459366274043c1c5327f1a9d4e15d3564d99f8a15926af1d6d247 +554d8fbd865436ace900859874b6c8c7e1b782184158a86b7788644e27bd1997 diff --git a/src/shell.c.in b/src/shell.c.in index 730957bc25..b4d7fc287f 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -6632,7 +6632,6 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){ sqlite3_stmt *pStmt = 0; sqlite3_int64 nPage = 0; int pgSz = 0; - const char *zFilename; const char *zTail; char *zName = 0; int rc, i, j; @@ -6660,17 +6659,15 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){ if( nPage<1 ) goto dbtotxt_error; rc = sqlite3_prepare_v2(p->db, "PRAGMA databases", -1, &pStmt, 0); if( rc ) goto dbtotxt_error; - rc = 0; if( sqlite3_step(pStmt)!=SQLITE_ROW ){ - zTail = zFilename = "unk.db"; + zTail = "unk.db"; }else{ - zFilename = (const char*)sqlite3_column_text(pStmt, 2); + const char *zFilename = (const char*)sqlite3_column_text(pStmt, 2); if( zFilename==0 || zFilename[0]==0 ) zFilename = "unk.db"; zTail = strrchr(zFilename, '/'); #if defined(_WIN32) if( zTail==0 ) zTail = strrchr(zFilename, '\\'); #endif - if( zTail ) zFilename = zTail; } zName = strdup(zTail); shell_check_oom(zName); @@ -6681,7 +6678,6 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){ rc = sqlite3_prepare_v2(p->db, "SELECT pgno, data FROM sqlite_dbpage ORDER BY pgno", -1, &pStmt, 0); if( rc ) goto dbtotxt_error; - rc = 0; while( sqlite3_step(pStmt)==SQLITE_ROW ){ sqlite3_int64 pgno = sqlite3_column_int64(pStmt, 0); const u8 *aData = sqlite3_column_blob(pStmt, 1);