Fossil SCM
Fix several harmless compiler warnings (turned off in the standard build).
Commit
ab05475997fc58b967da852a47b90834aba4f149ddaf695b4b9dbfb71180ef3e
Parent
17fe108ed408634…
7 files changed
+2
-1
+1
-1
+2
-1
+2
-1
+2
-1
+1
-1
+5
-4
+2
-1
| --- src/builtin.c | ||
| +++ src/builtin.c | ||
| @@ -577,11 +577,12 @@ | ||
| 577 | 577 | /* xFindMethod */ 0, |
| 578 | 578 | /* xRename */ 0, |
| 579 | 579 | /* xSavepoint */ 0, |
| 580 | 580 | /* xRelease */ 0, |
| 581 | 581 | /* xRollbackTo */ 0, |
| 582 | - /* xShadowName */ 0 | |
| 582 | + /* xShadowName */ 0, | |
| 583 | + /* xIntegrity */ 0 | |
| 583 | 584 | }; |
| 584 | 585 | |
| 585 | 586 | |
| 586 | 587 | /* |
| 587 | 588 | ** Register the builtin virtual table |
| 588 | 589 |
| --- 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 |
M
src/db.c
+1
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -172,11 +172,11 @@ | ||
| 172 | 172 | int bProtectTriggers; /* True if protection triggers already exist */ |
| 173 | 173 | int nProtect; /* Slots of aProtect used */ |
| 174 | 174 | unsigned aProtect[12]; /* Saved values of protectMask */ |
| 175 | 175 | } db = { |
| 176 | 176 | 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}}; | |
| 178 | 178 | |
| 179 | 179 | /* |
| 180 | 180 | ** Arrange for the given file to be deleted on a failure. |
| 181 | 181 | */ |
| 182 | 182 | void db_delete_on_failure(const char *zFilename){ |
| 183 | 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, }; |
| 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 @@ | ||
| 486 | 486 | /* xFindMethod */ 0, |
| 487 | 487 | /* xRename */ 0, |
| 488 | 488 | /* xSavepoint */ 0, |
| 489 | 489 | /* xRelease */ 0, |
| 490 | 490 | /* xRollbackTo */ 0, |
| 491 | - /* xShadowName */ 0 | |
| 491 | + /* xShadowName */ 0, | |
| 492 | + /* xIntegrity */ 0 | |
| 492 | 493 | }; |
| 493 | 494 | |
| 494 | 495 | /* |
| 495 | 496 | ** Invoke this routine to register the various delta functions. |
| 496 | 497 | */ |
| 497 | 498 |
| --- 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 @@ | ||
| 1543 | 1543 | /* xFindMethod */ 0, |
| 1544 | 1544 | /* xRename */ 0, |
| 1545 | 1545 | /* xSavepoint */ 0, |
| 1546 | 1546 | /* xRelease */ 0, |
| 1547 | 1547 | /* xRollbackTo */ 0, |
| 1548 | - /* xShadowName */ 0 | |
| 1548 | + /* xShadowName */ 0, | |
| 1549 | + /* xIntegrity */ 0 | |
| 1549 | 1550 | }; |
| 1550 | 1551 | |
| 1551 | 1552 | |
| 1552 | 1553 | /* |
| 1553 | 1554 | ** Register the helptext virtual table |
| 1554 | 1555 |
| --- 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 @@ | ||
| 268 | 268 | 0, /* xFindFunction */ |
| 269 | 269 | 0, /* xRename */ |
| 270 | 270 | 0, /* xSavepoint */ |
| 271 | 271 | 0, /* xRelease */ |
| 272 | 272 | 0, /* xRollbackTo */ |
| 273 | - 0 /* xShadowName */ | |
| 273 | + 0, /* xShadowName */ | |
| 274 | + 0 /* xIntegrity */ | |
| 274 | 275 | }; |
| 275 | 276 | sqlite3_create_module(db, "files_of_checkin", &foci_module, 0); |
| 276 | 277 | return SQLITE_OK; |
| 277 | 278 | } |
| 278 | 279 |
| --- 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 @@ | ||
| 54 | 54 | /* |
| 55 | 55 | ** Compute an appropriate Anti-CSRF token into g.zCsrfToken[]. |
| 56 | 56 | */ |
| 57 | 57 | static void login_create_csrf_secret(const char *zSeed){ |
| 58 | 58 | unsigned char zResult[20]; |
| 59 | - int i; | |
| 59 | + unsigned int i; | |
| 60 | 60 | |
| 61 | 61 | sha1sum_binary(zSeed, zResult); |
| 62 | 62 | for(i=0; i<sizeof(g.zCsrfToken)-1; i++){ |
| 63 | 63 | g.zCsrfToken[i] = "abcdefghijklmnopqrstuvwxyz" |
| 64 | 64 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 65 | 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 | 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 @@ | ||
| 627 | 627 | /* Search using FTS */ |
| 628 | 628 | Blob com; |
| 629 | 629 | Blob snip; |
| 630 | 630 | const char *zPattern = blob_str(&pattern); |
| 631 | 631 | int srchFlags; |
| 632 | + unsigned int j; | |
| 632 | 633 | if( zScope==0 ){ |
| 633 | 634 | srchFlags = SRCH_ALL; |
| 634 | 635 | }else{ |
| 635 | 636 | srchFlags = 0; |
| 636 | 637 | for(i=0; zScope[i]; i++){ |
| @@ -667,14 +668,14 @@ | ||
| 667 | 668 | const char *zLabel = db_column_text(&q, 1); |
| 668 | 669 | const char *zDate = db_column_text(&q, 4); |
| 669 | 670 | const char *zScore = db_column_text(&q, 2); |
| 670 | 671 | const char *zId = db_column_text(&q, 3); |
| 671 | 672 | 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] = ' '; | |
| 676 | 677 | } |
| 677 | 678 | } |
| 678 | 679 | blob_appendf(&com, "%s\n%s\n%s", zLabel, blob_str(&snip), zDate); |
| 679 | 680 | if( bDebug ){ |
| 680 | 681 | blob_appendf(&com," score: %s id: %s", zScore, zId); |
| 681 | 682 |
| --- 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 |