Fossil SCM

Fix several harmless compiler warnings (turned off in the standard build).

danield 2024-01-18 14:50 trunk
Commit ab05475997fc58b967da852a47b90834aba4f149ddaf695b4b9dbfb71180ef3e
+2 -1
--- src/builtin.c
+++ src/builtin.c
@@ -577,11 +577,12 @@
577577
/* xFindMethod */ 0,
578578
/* xRename */ 0,
579579
/* xSavepoint */ 0,
580580
/* xRelease */ 0,
581581
/* xRollbackTo */ 0,
582
- /* xShadowName */ 0
582
+ /* xShadowName */ 0,
583
+ /* xIntegrity */ 0
583584
};
584585
585586
586587
/*
587588
** Register the builtin virtual table
588589
--- src/builtin.c
+++ src/builtin.c
@@ -577,11 +577,12 @@
577 /* xFindMethod */ 0,
578 /* xRename */ 0,
579 /* xSavepoint */ 0,
580 /* xRelease */ 0,
581 /* xRollbackTo */ 0,
582 /* xShadowName */ 0
 
583 };
584
585
586 /*
587 ** Register the builtin virtual table
588
--- src/builtin.c
+++ src/builtin.c
@@ -577,11 +577,12 @@
577 /* xFindMethod */ 0,
578 /* xRename */ 0,
579 /* xSavepoint */ 0,
580 /* xRelease */ 0,
581 /* xRollbackTo */ 0,
582 /* xShadowName */ 0,
583 /* xIntegrity */ 0
584 };
585
586
587 /*
588 ** Register the builtin virtual table
589
+1 -1
--- src/db.c
+++ src/db.c
@@ -172,11 +172,11 @@
172172
int bProtectTriggers; /* True if protection triggers already exist */
173173
int nProtect; /* Slots of aProtect used */
174174
unsigned aProtect[12]; /* Saved values of protectMask */
175175
} db = {
176176
PROTECT_USER|PROTECT_CONFIG|PROTECT_BASELINE, /* protectMask */
177
- 0, 0, 0, 0, 0, 0, };
177
+ 0, 0, 0, 0, 0, 0, 0, {{0}}, {0}, {0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0}};
178178
179179
/*
180180
** Arrange for the given file to be deleted on a failure.
181181
*/
182182
void db_delete_on_failure(const char *zFilename){
183183
--- src/db.c
+++ src/db.c
@@ -172,11 +172,11 @@
172 int bProtectTriggers; /* True if protection triggers already exist */
173 int nProtect; /* Slots of aProtect used */
174 unsigned aProtect[12]; /* Saved values of protectMask */
175 } db = {
176 PROTECT_USER|PROTECT_CONFIG|PROTECT_BASELINE, /* protectMask */
177 0, 0, 0, 0, 0, 0, };
178
179 /*
180 ** Arrange for the given file to be deleted on a failure.
181 */
182 void db_delete_on_failure(const char *zFilename){
183
--- src/db.c
+++ src/db.c
@@ -172,11 +172,11 @@
172 int bProtectTriggers; /* True if protection triggers already exist */
173 int nProtect; /* Slots of aProtect used */
174 unsigned aProtect[12]; /* Saved values of protectMask */
175 } db = {
176 PROTECT_USER|PROTECT_CONFIG|PROTECT_BASELINE, /* protectMask */
177 0, 0, 0, 0, 0, 0, 0, {{0}}, {0}, {0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0}};
178
179 /*
180 ** Arrange for the given file to be deleted on a failure.
181 */
182 void db_delete_on_failure(const char *zFilename){
183
+2 -1
--- src/deltafunc.c
+++ src/deltafunc.c
@@ -486,11 +486,12 @@
486486
/* xFindMethod */ 0,
487487
/* xRename */ 0,
488488
/* xSavepoint */ 0,
489489
/* xRelease */ 0,
490490
/* xRollbackTo */ 0,
491
- /* xShadowName */ 0
491
+ /* xShadowName */ 0,
492
+ /* xIntegrity */ 0
492493
};
493494
494495
/*
495496
** Invoke this routine to register the various delta functions.
496497
*/
497498
--- src/deltafunc.c
+++ src/deltafunc.c
@@ -486,11 +486,12 @@
486 /* xFindMethod */ 0,
487 /* xRename */ 0,
488 /* xSavepoint */ 0,
489 /* xRelease */ 0,
490 /* xRollbackTo */ 0,
491 /* xShadowName */ 0
 
492 };
493
494 /*
495 ** Invoke this routine to register the various delta functions.
496 */
497
--- src/deltafunc.c
+++ src/deltafunc.c
@@ -486,11 +486,12 @@
486 /* xFindMethod */ 0,
487 /* xRename */ 0,
488 /* xSavepoint */ 0,
489 /* xRelease */ 0,
490 /* xRollbackTo */ 0,
491 /* xShadowName */ 0,
492 /* xIntegrity */ 0
493 };
494
495 /*
496 ** Invoke this routine to register the various delta functions.
497 */
498
+2 -1
--- src/dispatch.c
+++ src/dispatch.c
@@ -1543,11 +1543,12 @@
15431543
/* xFindMethod */ 0,
15441544
/* xRename */ 0,
15451545
/* xSavepoint */ 0,
15461546
/* xRelease */ 0,
15471547
/* xRollbackTo */ 0,
1548
- /* xShadowName */ 0
1548
+ /* xShadowName */ 0,
1549
+ /* xIntegrity */ 0
15491550
};
15501551
15511552
15521553
/*
15531554
** Register the helptext virtual table
15541555
--- src/dispatch.c
+++ src/dispatch.c
@@ -1543,11 +1543,12 @@
1543 /* xFindMethod */ 0,
1544 /* xRename */ 0,
1545 /* xSavepoint */ 0,
1546 /* xRelease */ 0,
1547 /* xRollbackTo */ 0,
1548 /* xShadowName */ 0
 
1549 };
1550
1551
1552 /*
1553 ** Register the helptext virtual table
1554
--- src/dispatch.c
+++ src/dispatch.c
@@ -1543,11 +1543,12 @@
1543 /* xFindMethod */ 0,
1544 /* xRename */ 0,
1545 /* xSavepoint */ 0,
1546 /* xRelease */ 0,
1547 /* xRollbackTo */ 0,
1548 /* xShadowName */ 0,
1549 /* xIntegrity */ 0
1550 };
1551
1552
1553 /*
1554 ** Register the helptext virtual table
1555
+2 -1
--- src/foci.c
+++ src/foci.c
@@ -268,10 +268,11 @@
268268
0, /* xFindFunction */
269269
0, /* xRename */
270270
0, /* xSavepoint */
271271
0, /* xRelease */
272272
0, /* xRollbackTo */
273
- 0 /* xShadowName */
273
+ 0, /* xShadowName */
274
+ 0 /* xIntegrity */
274275
};
275276
sqlite3_create_module(db, "files_of_checkin", &foci_module, 0);
276277
return SQLITE_OK;
277278
}
278279
--- src/foci.c
+++ src/foci.c
@@ -268,10 +268,11 @@
268 0, /* xFindFunction */
269 0, /* xRename */
270 0, /* xSavepoint */
271 0, /* xRelease */
272 0, /* xRollbackTo */
273 0 /* xShadowName */
 
274 };
275 sqlite3_create_module(db, "files_of_checkin", &foci_module, 0);
276 return SQLITE_OK;
277 }
278
--- src/foci.c
+++ src/foci.c
@@ -268,10 +268,11 @@
268 0, /* xFindFunction */
269 0, /* xRename */
270 0, /* xSavepoint */
271 0, /* xRelease */
272 0, /* xRollbackTo */
273 0, /* xShadowName */
274 0 /* xIntegrity */
275 };
276 sqlite3_create_module(db, "files_of_checkin", &foci_module, 0);
277 return SQLITE_OK;
278 }
279
+1 -1
--- src/login.c
+++ src/login.c
@@ -54,11 +54,11 @@
5454
/*
5555
** Compute an appropriate Anti-CSRF token into g.zCsrfToken[].
5656
*/
5757
static void login_create_csrf_secret(const char *zSeed){
5858
unsigned char zResult[20];
59
- int i;
59
+ unsigned int i;
6060
6161
sha1sum_binary(zSeed, zResult);
6262
for(i=0; i<sizeof(g.zCsrfToken)-1; i++){
6363
g.zCsrfToken[i] = "abcdefghijklmnopqrstuvwxyz"
6464
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
6565
--- src/login.c
+++ src/login.c
@@ -54,11 +54,11 @@
54 /*
55 ** Compute an appropriate Anti-CSRF token into g.zCsrfToken[].
56 */
57 static void login_create_csrf_secret(const char *zSeed){
58 unsigned char zResult[20];
59 int i;
60
61 sha1sum_binary(zSeed, zResult);
62 for(i=0; i<sizeof(g.zCsrfToken)-1; i++){
63 g.zCsrfToken[i] = "abcdefghijklmnopqrstuvwxyz"
64 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
65
--- src/login.c
+++ src/login.c
@@ -54,11 +54,11 @@
54 /*
55 ** Compute an appropriate Anti-CSRF token into g.zCsrfToken[].
56 */
57 static void login_create_csrf_secret(const char *zSeed){
58 unsigned char zResult[20];
59 unsigned int i;
60
61 sha1sum_binary(zSeed, zResult);
62 for(i=0; i<sizeof(g.zCsrfToken)-1; i++){
63 g.zCsrfToken[i] = "abcdefghijklmnopqrstuvwxyz"
64 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
65
+5 -4
--- src/search.c
+++ src/search.c
@@ -627,10 +627,11 @@
627627
/* Search using FTS */
628628
Blob com;
629629
Blob snip;
630630
const char *zPattern = blob_str(&pattern);
631631
int srchFlags;
632
+ unsigned int j;
632633
if( zScope==0 ){
633634
srchFlags = SRCH_ALL;
634635
}else{
635636
srchFlags = 0;
636637
for(i=0; zScope[i]; i++){
@@ -667,14 +668,14 @@
667668
const char *zLabel = db_column_text(&q, 1);
668669
const char *zDate = db_column_text(&q, 4);
669670
const char *zScore = db_column_text(&q, 2);
670671
const char *zId = db_column_text(&q, 3);
671672
blob_appendf(&snip, "%s", zSnippet);
672
- for(i=0; i<snip.nUsed; i++){
673
- if( snip.aData[i]=='\n' ){
674
- if( i>0 && snip.aData[i-1]=='\r' ) snip.aData[i-1] = ' ';
675
- snip.aData[i] = ' ';
673
+ for(j=0; j<snip.nUsed; j++){
674
+ if( snip.aData[j]=='\n' ){
675
+ if( j>0 && snip.aData[j-1]=='\r' ) snip.aData[j-1] = ' ';
676
+ snip.aData[j] = ' ';
676677
}
677678
}
678679
blob_appendf(&com, "%s\n%s\n%s", zLabel, blob_str(&snip), zDate);
679680
if( bDebug ){
680681
blob_appendf(&com," score: %s id: %s", zScore, zId);
681682
--- src/search.c
+++ src/search.c
@@ -627,10 +627,11 @@
627 /* Search using FTS */
628 Blob com;
629 Blob snip;
630 const char *zPattern = blob_str(&pattern);
631 int srchFlags;
 
632 if( zScope==0 ){
633 srchFlags = SRCH_ALL;
634 }else{
635 srchFlags = 0;
636 for(i=0; zScope[i]; i++){
@@ -667,14 +668,14 @@
667 const char *zLabel = db_column_text(&q, 1);
668 const char *zDate = db_column_text(&q, 4);
669 const char *zScore = db_column_text(&q, 2);
670 const char *zId = db_column_text(&q, 3);
671 blob_appendf(&snip, "%s", zSnippet);
672 for(i=0; i<snip.nUsed; i++){
673 if( snip.aData[i]=='\n' ){
674 if( i>0 && snip.aData[i-1]=='\r' ) snip.aData[i-1] = ' ';
675 snip.aData[i] = ' ';
676 }
677 }
678 blob_appendf(&com, "%s\n%s\n%s", zLabel, blob_str(&snip), zDate);
679 if( bDebug ){
680 blob_appendf(&com," score: %s id: %s", zScore, zId);
681
--- src/search.c
+++ src/search.c
@@ -627,10 +627,11 @@
627 /* Search using FTS */
628 Blob com;
629 Blob snip;
630 const char *zPattern = blob_str(&pattern);
631 int srchFlags;
632 unsigned int j;
633 if( zScope==0 ){
634 srchFlags = SRCH_ALL;
635 }else{
636 srchFlags = 0;
637 for(i=0; zScope[i]; i++){
@@ -667,14 +668,14 @@
668 const char *zLabel = db_column_text(&q, 1);
669 const char *zDate = db_column_text(&q, 4);
670 const char *zScore = db_column_text(&q, 2);
671 const char *zId = db_column_text(&q, 3);
672 blob_appendf(&snip, "%s", zSnippet);
673 for(j=0; j<snip.nUsed; j++){
674 if( snip.aData[j]=='\n' ){
675 if( j>0 && snip.aData[j-1]=='\r' ) snip.aData[j-1] = ' ';
676 snip.aData[j] = ' ';
677 }
678 }
679 blob_appendf(&com, "%s\n%s\n%s", zLabel, blob_str(&snip), zDate);
680 if( bDebug ){
681 blob_appendf(&com," score: %s id: %s", zScore, zId);
682

Keyboard Shortcuts

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