Fossil SCM

Remove dead code to fix harmless compiler warnings.

drh 2017-09-20 13:35 trunk
Commit 4c666ccf92b7827311c86bd09163eedde8f3a6adeb24247ba99f9b40e4da4c6d
+1 -30
--- src/configure.c
+++ src/configure.c
@@ -244,42 +244,13 @@
244244
}
245245
return 0;
246246
}
247247
248248
/*
249
-** Two SQL functions:
250
-**
251
-** config_is_reset(int)
252
-** config_reset(int)
253
-**
254
-** The config_is_reset() function takes the integer valued argument and
255
-** ANDs it against the static variable "configHasBeenReset" below. The
256
-** function returns TRUE or FALSE depending on the result depending on
257
-** whether or not the corresponding configuration table has been reset. The
258
-** config_reset() function adds the bits to "configHasBeenReset" that
259
-** are given in the argument.
260
-**
261
-** These functions are used below in the WHEN clause of a trigger to
262
-** get the trigger to fire exactly once.
249
+** A mask of all configuration tables that have been reset already.
263250
*/
264251
static int configHasBeenReset = 0;
265
-static void config_is_reset_function(
266
- sqlite3_context *context,
267
- int argc,
268
- sqlite3_value **argv
269
-){
270
- int m = sqlite3_value_int(argv[0]);
271
- sqlite3_result_int(context, (configHasBeenReset&m)!=0 );
272
-}
273
-static void config_reset_function(
274
- sqlite3_context *context,
275
- int argc,
276
- sqlite3_value **argv
277
-){
278
- int m = sqlite3_value_int(argv[0]);
279
- configHasBeenReset |= m;
280
-}
281252
282253
/*
283254
** Mask of modified configuration sets
284255
*/
285256
static int rebuildMask = 0;
286257
--- src/configure.c
+++ src/configure.c
@@ -244,42 +244,13 @@
244 }
245 return 0;
246 }
247
248 /*
249 ** Two SQL functions:
250 **
251 ** config_is_reset(int)
252 ** config_reset(int)
253 **
254 ** The config_is_reset() function takes the integer valued argument and
255 ** ANDs it against the static variable "configHasBeenReset" below. The
256 ** function returns TRUE or FALSE depending on the result depending on
257 ** whether or not the corresponding configuration table has been reset. The
258 ** config_reset() function adds the bits to "configHasBeenReset" that
259 ** are given in the argument.
260 **
261 ** These functions are used below in the WHEN clause of a trigger to
262 ** get the trigger to fire exactly once.
263 */
264 static int configHasBeenReset = 0;
265 static void config_is_reset_function(
266 sqlite3_context *context,
267 int argc,
268 sqlite3_value **argv
269 ){
270 int m = sqlite3_value_int(argv[0]);
271 sqlite3_result_int(context, (configHasBeenReset&m)!=0 );
272 }
273 static void config_reset_function(
274 sqlite3_context *context,
275 int argc,
276 sqlite3_value **argv
277 ){
278 int m = sqlite3_value_int(argv[0]);
279 configHasBeenReset |= m;
280 }
281
282 /*
283 ** Mask of modified configuration sets
284 */
285 static int rebuildMask = 0;
286
--- src/configure.c
+++ src/configure.c
@@ -244,42 +244,13 @@
244 }
245 return 0;
246 }
247
248 /*
249 ** A mask of all configuration tables that have been reset already.
 
 
 
 
 
 
 
 
 
 
 
 
 
250 */
251 static int configHasBeenReset = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
253 /*
254 ** Mask of modified configuration sets
255 */
256 static int rebuildMask = 0;
257
+1 -3
--- src/dispatch.c
+++ src/dispatch.c
@@ -145,12 +145,11 @@
145145
** removed.
146146
*/
147147
int dispatch_alias(const char *zName, const CmdOrPage **ppCmd){
148148
char *z;
149149
char *zQ;
150
- int i, j;
151
- char c;
150
+ int i;
152151
153152
z = db_text(0, "SELECT value FROM config WHERE name='walias:%q'",zName);
154153
if( z==0 ) return 1;
155154
for(i=0; z[i] && z[i]!='?'; i++){}
156155
if( z[i]=='?' ){
@@ -435,11 +434,10 @@
435434
@ </tr></table>
436435
437436
@ <h1>Settings:</h1>
438437
@ <table border="0"><tr>
439438
for(i=j=0; i<MX_COMMAND; i++){
440
- const char *z = aCommand[i].zName;
441439
if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
442440
j++;
443441
}
444442
n = (j+4)/5;
445443
for(i=j=0; i<MX_COMMAND; i++){
446444
--- src/dispatch.c
+++ src/dispatch.c
@@ -145,12 +145,11 @@
145 ** removed.
146 */
147 int dispatch_alias(const char *zName, const CmdOrPage **ppCmd){
148 char *z;
149 char *zQ;
150 int i, j;
151 char c;
152
153 z = db_text(0, "SELECT value FROM config WHERE name='walias:%q'",zName);
154 if( z==0 ) return 1;
155 for(i=0; z[i] && z[i]!='?'; i++){}
156 if( z[i]=='?' ){
@@ -435,11 +434,10 @@
435 @ </tr></table>
436
437 @ <h1>Settings:</h1>
438 @ <table border="0"><tr>
439 for(i=j=0; i<MX_COMMAND; i++){
440 const char *z = aCommand[i].zName;
441 if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
442 j++;
443 }
444 n = (j+4)/5;
445 for(i=j=0; i<MX_COMMAND; i++){
446
--- src/dispatch.c
+++ src/dispatch.c
@@ -145,12 +145,11 @@
145 ** removed.
146 */
147 int dispatch_alias(const char *zName, const CmdOrPage **ppCmd){
148 char *z;
149 char *zQ;
150 int i;
 
151
152 z = db_text(0, "SELECT value FROM config WHERE name='walias:%q'",zName);
153 if( z==0 ) return 1;
154 for(i=0; z[i] && z[i]!='?'; i++){}
155 if( z[i]=='?' ){
@@ -435,11 +434,10 @@
434 @ </tr></table>
435
436 @ <h1>Settings:</h1>
437 @ <table border="0"><tr>
438 for(i=j=0; i<MX_COMMAND; i++){
 
439 if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
440 j++;
441 }
442 n = (j+4)/5;
443 for(i=j=0; i<MX_COMMAND; i++){
444
+1 -1
--- src/file.c
+++ src/file.c
@@ -623,11 +623,11 @@
623623
**
624624
** On success, return zero. On error, return errorReturn if positive, otherwise
625625
** print an error message and abort.
626626
*/
627627
int file_mkfolder(const char *zFilename, int forceFlag, int errorReturn){
628
- int i, nName, rc = 0;
628
+ int nName, rc = 0;
629629
char *zName;
630630
631631
nName = strlen(zFilename);
632632
zName = mprintf("%s", zFilename);
633633
nName = file_simplify_name(zName, nName, 0);
634634
--- src/file.c
+++ src/file.c
@@ -623,11 +623,11 @@
623 **
624 ** On success, return zero. On error, return errorReturn if positive, otherwise
625 ** print an error message and abort.
626 */
627 int file_mkfolder(const char *zFilename, int forceFlag, int errorReturn){
628 int i, nName, rc = 0;
629 char *zName;
630
631 nName = strlen(zFilename);
632 zName = mprintf("%s", zFilename);
633 nName = file_simplify_name(zName, nName, 0);
634
--- src/file.c
+++ src/file.c
@@ -623,11 +623,11 @@
623 **
624 ** On success, return zero. On error, return errorReturn if positive, otherwise
625 ** print an error message and abort.
626 */
627 int file_mkfolder(const char *zFilename, int forceFlag, int errorReturn){
628 int nName, rc = 0;
629 char *zName;
630
631 nName = strlen(zFilename);
632 zName = mprintf("%s", zFilename);
633 nName = file_simplify_name(zName, nName, 0);
634
+1 -3
--- src/stat.c
+++ src/stat.c
@@ -130,15 +130,13 @@
130130
"SELECT count(*), sum(sz), sum(length(content))"
131131
" FROM unversioned"
132132
" WHERE length(hash)>1"
133133
);
134134
if( db_step(&q)==SQLITE_ROW && (n = db_column_int(&q,0))>0 ){
135
- sqlite3_int64 iSz, iStored, pct;
136
- /* iSz = db_column_int64(&q,1); */
135
+ sqlite3_int64 iStored, pct;
137136
iStored = db_column_int64(&q,2);
138137
pct = (iStored*100 + fsize - 1)/fsize;
139
- /* approxSizeName(sizeof(zBuf), zBuf, iSz); */
140138
approxSizeName(sizeof(zStored), zStored, iStored);
141139
@ <tr><th>Unversioned&nbsp;Files:</th><td>
142140
@ %z(href("%R/uvlist"))%d(n) files</a>,
143141
@ %s(zStored) compressed, %d(pct)%% of total repository space
144142
@ </td></tr>
145143
--- src/stat.c
+++ src/stat.c
@@ -130,15 +130,13 @@
130 "SELECT count(*), sum(sz), sum(length(content))"
131 " FROM unversioned"
132 " WHERE length(hash)>1"
133 );
134 if( db_step(&q)==SQLITE_ROW && (n = db_column_int(&q,0))>0 ){
135 sqlite3_int64 iSz, iStored, pct;
136 /* iSz = db_column_int64(&q,1); */
137 iStored = db_column_int64(&q,2);
138 pct = (iStored*100 + fsize - 1)/fsize;
139 /* approxSizeName(sizeof(zBuf), zBuf, iSz); */
140 approxSizeName(sizeof(zStored), zStored, iStored);
141 @ <tr><th>Unversioned&nbsp;Files:</th><td>
142 @ %z(href("%R/uvlist"))%d(n) files</a>,
143 @ %s(zStored) compressed, %d(pct)%% of total repository space
144 @ </td></tr>
145
--- src/stat.c
+++ src/stat.c
@@ -130,15 +130,13 @@
130 "SELECT count(*), sum(sz), sum(length(content))"
131 " FROM unversioned"
132 " WHERE length(hash)>1"
133 );
134 if( db_step(&q)==SQLITE_ROW && (n = db_column_int(&q,0))>0 ){
135 sqlite3_int64 iStored, pct;
 
136 iStored = db_column_int64(&q,2);
137 pct = (iStored*100 + fsize - 1)/fsize;
 
138 approxSizeName(sizeof(zStored), zStored, iStored);
139 @ <tr><th>Unversioned&nbsp;Files:</th><td>
140 @ %z(href("%R/uvlist"))%d(n) files</a>,
141 @ %s(zStored) compressed, %d(pct)%% of total repository space
142 @ </td></tr>
143

Keyboard Shortcuts

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