Fossil SCM

Fix harmless compiler warnings in the shell

jan.nijtmans 2017-03-22 16:15 trunk
Commit cc65959b0fd62b4173d66088266f3360b3f2cbae5eea09fa5821147f349488ed
--- src/login.c
+++ src/login.c
@@ -860,11 +860,10 @@
860860
int uid = 0;
861861
int nDecode = 0;
862862
char *zDecode = 0;
863863
const char *zUsername = 0;
864864
const char *zPasswd = 0;
865
-
866865
867866
if( zAuth==0 ) return 0; /* Fail: No Authentication: header */
868867
while( fossil_isspace(zAuth[0]) ) zAuth++; /* Skip leading whitespace */
869868
if( strncmp(zAuth, "Basic ", 6)!=0 ) return 0; /* Fail: Not Basic Authentication */
870869
871870
--- src/login.c
+++ src/login.c
@@ -860,11 +860,10 @@
860 int uid = 0;
861 int nDecode = 0;
862 char *zDecode = 0;
863 const char *zUsername = 0;
864 const char *zPasswd = 0;
865
866
867 if( zAuth==0 ) return 0; /* Fail: No Authentication: header */
868 while( fossil_isspace(zAuth[0]) ) zAuth++; /* Skip leading whitespace */
869 if( strncmp(zAuth, "Basic ", 6)!=0 ) return 0; /* Fail: Not Basic Authentication */
870
871
--- src/login.c
+++ src/login.c
@@ -860,11 +860,10 @@
860 int uid = 0;
861 int nDecode = 0;
862 char *zDecode = 0;
863 const char *zUsername = 0;
864 const char *zPasswd = 0;
 
865
866 if( zAuth==0 ) return 0; /* Fail: No Authentication: header */
867 while( fossil_isspace(zAuth[0]) ) zAuth++; /* Skip leading whitespace */
868 if( strncmp(zAuth, "Basic ", 6)!=0 ) return 0; /* Fail: Not Basic Authentication */
869
870
+2 -3
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
29242924
if( i>nCol ){
29252925
/* At this point, we know that azRowid[j] is not the name of any
29262926
** ordinary column in the table. Verify that azRowid[j] is a valid
29272927
** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
29282928
** tables will fail this last check */
2929
- int rc;
29302929
rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
29312930
if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
29322931
break;
29332932
}
29342933
}
@@ -2957,18 +2956,18 @@
29572956
** This is a different callback routine used for dumping the database.
29582957
** Each row received by this callback consists of a table name,
29592958
** the table type ("index" or "table") and SQL to create the table.
29602959
** This routine should print text sufficient to recreate the table.
29612960
*/
2962
-static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
2961
+static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
29632962
int rc;
29642963
const char *zTable;
29652964
const char *zType;
29662965
const char *zSql;
29672966
ShellState *p = (ShellState *)pArg;
29682967
2969
- UNUSED_PARAMETER(azCol);
2968
+ UNUSED_PARAMETER(azNotUsed);
29702969
if( nArg!=3 ) return 1;
29712970
zTable = azArg[0];
29722971
zType = azArg[1];
29732972
zSql = azArg[2];
29742973
29752974
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
2924 if( i>nCol ){
2925 /* At this point, we know that azRowid[j] is not the name of any
2926 ** ordinary column in the table. Verify that azRowid[j] is a valid
2927 ** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
2928 ** tables will fail this last check */
2929 int rc;
2930 rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
2931 if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
2932 break;
2933 }
2934 }
@@ -2957,18 +2956,18 @@
2957 ** This is a different callback routine used for dumping the database.
2958 ** Each row received by this callback consists of a table name,
2959 ** the table type ("index" or "table") and SQL to create the table.
2960 ** This routine should print text sufficient to recreate the table.
2961 */
2962 static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
2963 int rc;
2964 const char *zTable;
2965 const char *zType;
2966 const char *zSql;
2967 ShellState *p = (ShellState *)pArg;
2968
2969 UNUSED_PARAMETER(azCol);
2970 if( nArg!=3 ) return 1;
2971 zTable = azArg[0];
2972 zType = azArg[1];
2973 zSql = azArg[2];
2974
2975
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
2924 if( i>nCol ){
2925 /* At this point, we know that azRowid[j] is not the name of any
2926 ** ordinary column in the table. Verify that azRowid[j] is a valid
2927 ** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
2928 ** tables will fail this last check */
 
2929 rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
2930 if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
2931 break;
2932 }
2933 }
@@ -2957,18 +2956,18 @@
2956 ** This is a different callback routine used for dumping the database.
2957 ** Each row received by this callback consists of a table name,
2958 ** the table type ("index" or "table") and SQL to create the table.
2959 ** This routine should print text sufficient to recreate the table.
2960 */
2961 static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
2962 int rc;
2963 const char *zTable;
2964 const char *zType;
2965 const char *zSql;
2966 ShellState *p = (ShellState *)pArg;
2967
2968 UNUSED_PARAMETER(azNotUsed);
2969 if( nArg!=3 ) return 1;
2970 zTable = azArg[0];
2971 zType = azArg[1];
2972 zSql = azArg[2];
2973
2974
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,11 +4,11 @@
44
<h2>Changes for Version 2.2 (2017-??-??)</h2>
55
66
* Show the content of README files on directory listings.
77
([/file/skins|example])
88
* Support for Basic Authentication if enabled (default off).
9
- * Show the hash algorithms used on the
9
+ * Show the hash algorithms used on the
1010
[/help?cmd=/rcvfromlist|/rcvfromlist] page.
1111
* The [/help?cmd=/tarball|/tarball] and [/help?cmd=/zip|/zip] pages
1212
now use the the r= query parameter
1313
to select which check-in to deliver. The uuid= query parameter
1414
is still accepted for backwards compatibility.
@@ -42,11 +42,11 @@
4242
<a name='v1_37'></a>
4343
<h2>Changes for Version 1.37 (2017-01-16)</h2>
4444
4545
* Add checkbox widgets to various web pages. See [/technote/8d18bf27e9|
4646
this technote] for more information. To get the checkboxes to look as
47
- intended, you must update the CSS in your repository and all clones.
47
+ intended, you must update the CSS in your repository and all clones.
4848
* Add the [/help/all|fossil all ui] command
4949
* Add the [/help?cmd=/file|/file] webpage
5050
* Enhance the [/help?cmd=/brlist|/brlist] webpage to make use of branch colors.
5151
* Add support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the
5252
[/help?cmd=/timeline|/timeline] webpage, with associated form widgets.
5353
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,11 +4,11 @@
4 <h2>Changes for Version 2.2 (2017-??-??)</h2>
5
6 * Show the content of README files on directory listings.
7 ([/file/skins|example])
8 * Support for Basic Authentication if enabled (default off).
9 * Show the hash algorithms used on the
10 [/help?cmd=/rcvfromlist|/rcvfromlist] page.
11 * The [/help?cmd=/tarball|/tarball] and [/help?cmd=/zip|/zip] pages
12 now use the the r= query parameter
13 to select which check-in to deliver. The uuid= query parameter
14 is still accepted for backwards compatibility.
@@ -42,11 +42,11 @@
42 <a name='v1_37'></a>
43 <h2>Changes for Version 1.37 (2017-01-16)</h2>
44
45 * Add checkbox widgets to various web pages. See [/technote/8d18bf27e9|
46 this technote] for more information. To get the checkboxes to look as
47 intended, you must update the CSS in your repository and all clones.
48 * Add the [/help/all|fossil all ui] command
49 * Add the [/help?cmd=/file|/file] webpage
50 * Enhance the [/help?cmd=/brlist|/brlist] webpage to make use of branch colors.
51 * Add support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the
52 [/help?cmd=/timeline|/timeline] webpage, with associated form widgets.
53
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,11 +4,11 @@
4 <h2>Changes for Version 2.2 (2017-??-??)</h2>
5
6 * Show the content of README files on directory listings.
7 ([/file/skins|example])
8 * Support for Basic Authentication if enabled (default off).
9 * Show the hash algorithms used on the
10 [/help?cmd=/rcvfromlist|/rcvfromlist] page.
11 * The [/help?cmd=/tarball|/tarball] and [/help?cmd=/zip|/zip] pages
12 now use the the r= query parameter
13 to select which check-in to deliver. The uuid= query parameter
14 is still accepted for backwards compatibility.
@@ -42,11 +42,11 @@
42 <a name='v1_37'></a>
43 <h2>Changes for Version 1.37 (2017-01-16)</h2>
44
45 * Add checkbox widgets to various web pages. See [/technote/8d18bf27e9|
46 this technote] for more information. To get the checkboxes to look as
47 intended, you must update the CSS in your repository and all clones.
48 * Add the [/help/all|fossil all ui] command
49 * Add the [/help?cmd=/file|/file] webpage
50 * Enhance the [/help?cmd=/brlist|/brlist] webpage to make use of branch colors.
51 * Add support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the
52 [/help?cmd=/timeline|/timeline] webpage, with associated form widgets.
53

Keyboard Shortcuts

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