Fossil SCM

Update to a newer SQLite that fixes harmless compiler warnings in shell.c

drh 2025-11-19 19:40 trunk
Commit 0276100da6d2972f1f9a2d12d7eea56940d1e1686502bfd3383d8e7223cb80ad
+28 -25
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -24112,12 +24112,12 @@
2411224112
** Change the mode to eMode
2411324113
*/
2411424114
static void modeChange(ShellState *p, unsigned char eMode){
2411524115
const ModeInfo *pI;
2411624116
if( eMode<ArraySize(aModeInfo) ){
24117
- pI = &aModeInfo[eMode];
2411824117
Mode *pM = &p->mode;
24118
+ pI = &aModeInfo[eMode];
2411924119
pM->eMode = eMode;
2412024120
if( pI->eCSep ) modeSetStr(&pM->spec.zColumnSep, aModeStr[pI->eCSep]);
2412124121
if( pI->eRSep ) modeSetStr(&pM->spec.zRowSep, aModeStr[pI->eRSep]);
2412224122
if( pI->eNull ) modeSetStr(&pM->spec.zNull, aModeStr[pI->eNull]);
2412324123
pM->spec.eText = pI->eText;
@@ -24613,38 +24613,41 @@
2461324613
}
2461424614
2461524615
/* Try to determine the screen width. Use the default if unable.
2461624616
*/
2461724617
int shellScreenWidth(void){
24618
- if( stdout_tty_width>0 ) return stdout_tty_width;
24618
+ if( stdout_tty_width>0 ){
24619
+ return stdout_tty_width;
24620
+ }else{
2461924621
#if defined(TIOCGSIZE)
24620
- struct ttysize ts;
24621
- if( ioctl(STDIN_FILENO, TIOCGSIZE, &ts)>=0
24622
- || ioctl(STDOUT_FILENO, TIOCGSIZE, &ts)>=0
24623
- || ioctl(STDERR_FILENO, TIOCGSIZE, &ts)>=0
24624
- ){
24625
- return ts.ts_cols;
24626
- }
24622
+ struct ttysize ts;
24623
+ if( ioctl(STDIN_FILENO, TIOCGSIZE, &ts)>=0
24624
+ || ioctl(STDOUT_FILENO, TIOCGSIZE, &ts)>=0
24625
+ || ioctl(STDERR_FILENO, TIOCGSIZE, &ts)>=0
24626
+ ){
24627
+ return ts.ts_cols;
24628
+ }
2462724629
#elif defined(TIOCGWINSZ)
24628
- struct winsize ws;
24629
- if( ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)>=0
24630
- || ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws)>=0
24631
- || ioctl(STDERR_FILENO, TIOCGWINSZ, &ws)>=0
24632
- ){
24633
- return ws.ws_col;
24634
- }
24630
+ struct winsize ws;
24631
+ if( ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)>=0
24632
+ || ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws)>=0
24633
+ || ioctl(STDERR_FILENO, TIOCGWINSZ, &ws)>=0
24634
+ ){
24635
+ return ws.ws_col;
24636
+ }
2463524637
#elif defined(_WIN32)
24636
- CONSOLE_SCREEN_BUFFER_INFO csbi;
24637
- if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)
24638
- || GetConsoleScreenBufferInfo(GetStdHandle(STD_ERROR_HANDLE), &csbi)
24639
- || GetConsoleScreenBufferInfo(GetStdHandle(STD_INPUT_HANDLE), &csbi)
24640
- ){
24641
- return csbi.srWindow.Right - csbi.srWindow.Left + 1;
24642
- }
24638
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
24639
+ if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)
24640
+ || GetConsoleScreenBufferInfo(GetStdHandle(STD_ERROR_HANDLE), &csbi)
24641
+ || GetConsoleScreenBufferInfo(GetStdHandle(STD_INPUT_HANDLE), &csbi)
24642
+ ){
24643
+ return csbi.srWindow.Right - csbi.srWindow.Left + 1;
24644
+ }
2464324645
#endif
2464424646
#define DEFAULT_SCREEN_WIDTH 80
24645
- return DEFAULT_SCREEN_WIDTH;
24647
+ return DEFAULT_SCREEN_WIDTH;
24648
+ }
2464624649
}
2464724650
2464824651
#if (defined(_WIN32) || defined(WIN32)) && !defined(_WIN32_WCE)
2464924652
/*
2465024653
** This routine runs for console events (e.g. Ctrl-C) on Win32
@@ -31876,12 +31879,12 @@
3187631879
data.mode.spec.nCharLimit = 0;
3187731880
data.mode.spec.zRowSep = "\n";
3187831881
rc = shell_exec(&data,zSql,0);
3187931882
sqlite3_free(zSql);
3188031883
if( rc==SQLITE_OK ){
31881
- memset(hasStat, 0, sizeof(hasStat));
3188231884
sqlite3_stmt *pStmt;
31885
+ memset(hasStat, 0, sizeof(hasStat));
3188331886
rc = sqlite3_prepare_v2(p->db,
3188431887
"SELECT substr(name,12,1) FROM sqlite_schema"
3188531888
" WHERE name GLOB 'sqlite_stat[134]'",
3188631889
-1, &pStmt, 0);
3188731890
if( rc==SQLITE_OK ){
3188831891
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -24112,12 +24112,12 @@
24112 ** Change the mode to eMode
24113 */
24114 static void modeChange(ShellState *p, unsigned char eMode){
24115 const ModeInfo *pI;
24116 if( eMode<ArraySize(aModeInfo) ){
24117 pI = &aModeInfo[eMode];
24118 Mode *pM = &p->mode;
 
24119 pM->eMode = eMode;
24120 if( pI->eCSep ) modeSetStr(&pM->spec.zColumnSep, aModeStr[pI->eCSep]);
24121 if( pI->eRSep ) modeSetStr(&pM->spec.zRowSep, aModeStr[pI->eRSep]);
24122 if( pI->eNull ) modeSetStr(&pM->spec.zNull, aModeStr[pI->eNull]);
24123 pM->spec.eText = pI->eText;
@@ -24613,38 +24613,41 @@
24613 }
24614
24615 /* Try to determine the screen width. Use the default if unable.
24616 */
24617 int shellScreenWidth(void){
24618 if( stdout_tty_width>0 ) return stdout_tty_width;
 
 
24619 #if defined(TIOCGSIZE)
24620 struct ttysize ts;
24621 if( ioctl(STDIN_FILENO, TIOCGSIZE, &ts)>=0
24622 || ioctl(STDOUT_FILENO, TIOCGSIZE, &ts)>=0
24623 || ioctl(STDERR_FILENO, TIOCGSIZE, &ts)>=0
24624 ){
24625 return ts.ts_cols;
24626 }
24627 #elif defined(TIOCGWINSZ)
24628 struct winsize ws;
24629 if( ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)>=0
24630 || ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws)>=0
24631 || ioctl(STDERR_FILENO, TIOCGWINSZ, &ws)>=0
24632 ){
24633 return ws.ws_col;
24634 }
24635 #elif defined(_WIN32)
24636 CONSOLE_SCREEN_BUFFER_INFO csbi;
24637 if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)
24638 || GetConsoleScreenBufferInfo(GetStdHandle(STD_ERROR_HANDLE), &csbi)
24639 || GetConsoleScreenBufferInfo(GetStdHandle(STD_INPUT_HANDLE), &csbi)
24640 ){
24641 return csbi.srWindow.Right - csbi.srWindow.Left + 1;
24642 }
24643 #endif
24644 #define DEFAULT_SCREEN_WIDTH 80
24645 return DEFAULT_SCREEN_WIDTH;
 
24646 }
24647
24648 #if (defined(_WIN32) || defined(WIN32)) && !defined(_WIN32_WCE)
24649 /*
24650 ** This routine runs for console events (e.g. Ctrl-C) on Win32
@@ -31876,12 +31879,12 @@
31876 data.mode.spec.nCharLimit = 0;
31877 data.mode.spec.zRowSep = "\n";
31878 rc = shell_exec(&data,zSql,0);
31879 sqlite3_free(zSql);
31880 if( rc==SQLITE_OK ){
31881 memset(hasStat, 0, sizeof(hasStat));
31882 sqlite3_stmt *pStmt;
 
31883 rc = sqlite3_prepare_v2(p->db,
31884 "SELECT substr(name,12,1) FROM sqlite_schema"
31885 " WHERE name GLOB 'sqlite_stat[134]'",
31886 -1, &pStmt, 0);
31887 if( rc==SQLITE_OK ){
31888
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -24112,12 +24112,12 @@
24112 ** Change the mode to eMode
24113 */
24114 static void modeChange(ShellState *p, unsigned char eMode){
24115 const ModeInfo *pI;
24116 if( eMode<ArraySize(aModeInfo) ){
 
24117 Mode *pM = &p->mode;
24118 pI = &aModeInfo[eMode];
24119 pM->eMode = eMode;
24120 if( pI->eCSep ) modeSetStr(&pM->spec.zColumnSep, aModeStr[pI->eCSep]);
24121 if( pI->eRSep ) modeSetStr(&pM->spec.zRowSep, aModeStr[pI->eRSep]);
24122 if( pI->eNull ) modeSetStr(&pM->spec.zNull, aModeStr[pI->eNull]);
24123 pM->spec.eText = pI->eText;
@@ -24613,38 +24613,41 @@
24613 }
24614
24615 /* Try to determine the screen width. Use the default if unable.
24616 */
24617 int shellScreenWidth(void){
24618 if( stdout_tty_width>0 ){
24619 return stdout_tty_width;
24620 }else{
24621 #if defined(TIOCGSIZE)
24622 struct ttysize ts;
24623 if( ioctl(STDIN_FILENO, TIOCGSIZE, &ts)>=0
24624 || ioctl(STDOUT_FILENO, TIOCGSIZE, &ts)>=0
24625 || ioctl(STDERR_FILENO, TIOCGSIZE, &ts)>=0
24626 ){
24627 return ts.ts_cols;
24628 }
24629 #elif defined(TIOCGWINSZ)
24630 struct winsize ws;
24631 if( ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)>=0
24632 || ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws)>=0
24633 || ioctl(STDERR_FILENO, TIOCGWINSZ, &ws)>=0
24634 ){
24635 return ws.ws_col;
24636 }
24637 #elif defined(_WIN32)
24638 CONSOLE_SCREEN_BUFFER_INFO csbi;
24639 if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)
24640 || GetConsoleScreenBufferInfo(GetStdHandle(STD_ERROR_HANDLE), &csbi)
24641 || GetConsoleScreenBufferInfo(GetStdHandle(STD_INPUT_HANDLE), &csbi)
24642 ){
24643 return csbi.srWindow.Right - csbi.srWindow.Left + 1;
24644 }
24645 #endif
24646 #define DEFAULT_SCREEN_WIDTH 80
24647 return DEFAULT_SCREEN_WIDTH;
24648 }
24649 }
24650
24651 #if (defined(_WIN32) || defined(WIN32)) && !defined(_WIN32_WCE)
24652 /*
24653 ** This routine runs for console events (e.g. Ctrl-C) on Win32
@@ -31876,12 +31879,12 @@
31879 data.mode.spec.nCharLimit = 0;
31880 data.mode.spec.zRowSep = "\n";
31881 rc = shell_exec(&data,zSql,0);
31882 sqlite3_free(zSql);
31883 if( rc==SQLITE_OK ){
 
31884 sqlite3_stmt *pStmt;
31885 memset(hasStat, 0, sizeof(hasStat));
31886 rc = sqlite3_prepare_v2(p->db,
31887 "SELECT substr(name,12,1) FROM sqlite_schema"
31888 " WHERE name GLOB 'sqlite_stat[134]'",
31889 -1, &pStmt, 0);
31890 if( rc==SQLITE_OK ){
31891
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21
-** 7e460ffa5aae884807db9e7c8214d6d822d5 with changes in files:
21
+** b65b29656c835db22557733f4dcfe906bf21 with changes in files:
2222
**
2323
**
2424
*/
2525
#ifndef SQLITE_AMALGAMATION
2626
#define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467467
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468468
** [sqlite_version()] and [sqlite_source_id()].
469469
*/
470470
#define SQLITE_VERSION "3.52.0"
471471
#define SQLITE_VERSION_NUMBER 3052000
472
-#define SQLITE_SOURCE_ID "2025-11-18 17:49:48 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa"
472
+#define SQLITE_SOURCE_ID "2025-11-19 19:37:28 b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901"
473473
#define SQLITE_SCM_BRANCH "trunk"
474474
#define SQLITE_SCM_TAGS ""
475
-#define SQLITE_SCM_DATETIME "2025-11-18T17:49:48.189Z"
475
+#define SQLITE_SCM_DATETIME "2025-11-19T19:37:28.777Z"
476476
477477
/*
478478
** CAPI3REF: Run-Time Library Version Numbers
479479
** KEYWORDS: sqlite3_version sqlite3_sourceid
480480
**
@@ -260458,11 +260458,11 @@
260458260458
int nArg, /* Number of args */
260459260459
sqlite3_value **apUnused /* Function arguments */
260460260460
){
260461260461
assert( nArg==0 );
260462260462
UNUSED_PARAM2(nArg, apUnused);
260463
- sqlite3_result_text(pCtx, "fts5: 2025-11-18 17:49:48 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa", -1, SQLITE_TRANSIENT);
260463
+ sqlite3_result_text(pCtx, "fts5: 2025-11-19 19:37:28 b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901", -1, SQLITE_TRANSIENT);
260464260464
}
260465260465
260466260466
/*
260467260467
** Implementation of fts5_locale(LOCALE, TEXT) function.
260468260468
**
260469260469
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** 7e460ffa5aae884807db9e7c8214d6d822d5 with changes in files:
22 **
23 **
24 */
25 #ifndef SQLITE_AMALGAMATION
26 #define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468 ** [sqlite_version()] and [sqlite_source_id()].
469 */
470 #define SQLITE_VERSION "3.52.0"
471 #define SQLITE_VERSION_NUMBER 3052000
472 #define SQLITE_SOURCE_ID "2025-11-18 17:49:48 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa"
473 #define SQLITE_SCM_BRANCH "trunk"
474 #define SQLITE_SCM_TAGS ""
475 #define SQLITE_SCM_DATETIME "2025-11-18T17:49:48.189Z"
476
477 /*
478 ** CAPI3REF: Run-Time Library Version Numbers
479 ** KEYWORDS: sqlite3_version sqlite3_sourceid
480 **
@@ -260458,11 +260458,11 @@
260458 int nArg, /* Number of args */
260459 sqlite3_value **apUnused /* Function arguments */
260460 ){
260461 assert( nArg==0 );
260462 UNUSED_PARAM2(nArg, apUnused);
260463 sqlite3_result_text(pCtx, "fts5: 2025-11-18 17:49:48 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa", -1, SQLITE_TRANSIENT);
260464 }
260465
260466 /*
260467 ** Implementation of fts5_locale(LOCALE, TEXT) function.
260468 **
260469
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** b65b29656c835db22557733f4dcfe906bf21 with changes in files:
22 **
23 **
24 */
25 #ifndef SQLITE_AMALGAMATION
26 #define SQLITE_CORE 1
@@ -467,14 +467,14 @@
467 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
468 ** [sqlite_version()] and [sqlite_source_id()].
469 */
470 #define SQLITE_VERSION "3.52.0"
471 #define SQLITE_VERSION_NUMBER 3052000
472 #define SQLITE_SOURCE_ID "2025-11-19 19:37:28 b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901"
473 #define SQLITE_SCM_BRANCH "trunk"
474 #define SQLITE_SCM_TAGS ""
475 #define SQLITE_SCM_DATETIME "2025-11-19T19:37:28.777Z"
476
477 /*
478 ** CAPI3REF: Run-Time Library Version Numbers
479 ** KEYWORDS: sqlite3_version sqlite3_sourceid
480 **
@@ -260458,11 +260458,11 @@
260458 int nArg, /* Number of args */
260459 sqlite3_value **apUnused /* Function arguments */
260460 ){
260461 assert( nArg==0 );
260462 UNUSED_PARAM2(nArg, apUnused);
260463 sqlite3_result_text(pCtx, "fts5: 2025-11-19 19:37:28 b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901", -1, SQLITE_TRANSIENT);
260464 }
260465
260466 /*
260467 ** Implementation of fts5_locale(LOCALE, TEXT) function.
260468 **
260469
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.52.0"
150150
#define SQLITE_VERSION_NUMBER 3052000
151
-#define SQLITE_SOURCE_ID "2025-11-18 17:49:48 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa"
151
+#define SQLITE_SOURCE_ID "2025-11-19 19:37:28 b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901"
152152
#define SQLITE_SCM_BRANCH "trunk"
153153
#define SQLITE_SCM_TAGS ""
154
-#define SQLITE_SCM_DATETIME "2025-11-18T17:49:48.189Z"
154
+#define SQLITE_SCM_DATETIME "2025-11-19T19:37:28.777Z"
155155
156156
/*
157157
** CAPI3REF: Run-Time Library Version Numbers
158158
** KEYWORDS: sqlite3_version sqlite3_sourceid
159159
**
160160
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.52.0"
150 #define SQLITE_VERSION_NUMBER 3052000
151 #define SQLITE_SOURCE_ID "2025-11-18 17:49:48 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa"
152 #define SQLITE_SCM_BRANCH "trunk"
153 #define SQLITE_SCM_TAGS ""
154 #define SQLITE_SCM_DATETIME "2025-11-18T17:49:48.189Z"
155
156 /*
157 ** CAPI3REF: Run-Time Library Version Numbers
158 ** KEYWORDS: sqlite3_version sqlite3_sourceid
159 **
160
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,14 +146,14 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.52.0"
150 #define SQLITE_VERSION_NUMBER 3052000
151 #define SQLITE_SOURCE_ID "2025-11-19 19:37:28 b65b29656c835db22557733f4dcfe906bf21a7a3c36266cbbc7e3277f029b901"
152 #define SQLITE_SCM_BRANCH "trunk"
153 #define SQLITE_SCM_TAGS ""
154 #define SQLITE_SCM_DATETIME "2025-11-19T19:37:28.777Z"
155
156 /*
157 ** CAPI3REF: Run-Time Library Version Numbers
158 ** KEYWORDS: sqlite3_version sqlite3_sourceid
159 **
160

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button