Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix several harmless compiler warnings (turned off in the standard build). |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
ab05475997fc58b967da852a47b90834 |
| User & Date: | danield 2024-01-18 14:50:58.875 |
Context
|
2024-01-18
| ||
| 15:20 | Document the --linenum and --invert command-line options to 'fossil diff'. check-in: eb4efc8ccd user: danield tags: trunk | |
| 14:50 | Fix several harmless compiler warnings (turned off in the standard build). check-in: ab05475997 user: danield tags: trunk | |
|
2024-01-15
| ||
| 12:00 | Remove a now-unused static const from search.c to squelch a compiler warning. check-in: 17fe108ed4 user: stephan tags: trunk | |
Changes
Changes to src/builtin.c.
| ︙ | ︙ | |||
575 576 577 578 579 580 581 | /* xCommit */ 0, /* xRollback */ 0, /* xFindMethod */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ 0, | | > | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
/* xCommit */ 0,
/* xRollback */ 0,
/* xFindMethod */ 0,
/* xRename */ 0,
/* xSavepoint */ 0,
/* xRelease */ 0,
/* xRollbackTo */ 0,
/* xShadowName */ 0,
/* xIntegrity */ 0
};
/*
** Register the builtin virtual table
*/
int builtin_vtab_register(sqlite3 *db){
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
170 171 172 173 174 175 176 |
void *pAuthArg; /* Argument to the authorizer */
const char *zAuthName; /* Name of the authorizer */
int bProtectTriggers; /* True if protection triggers already exist */
int nProtect; /* Slots of aProtect used */
unsigned aProtect[12]; /* Saved values of protectMask */
} db = {
PROTECT_USER|PROTECT_CONFIG|PROTECT_BASELINE, /* protectMask */
| | | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
void *pAuthArg; /* Argument to the authorizer */
const char *zAuthName; /* Name of the authorizer */
int bProtectTriggers; /* True if protection triggers already exist */
int nProtect; /* Slots of aProtect used */
unsigned aProtect[12]; /* Saved values of protectMask */
} db = {
PROTECT_USER|PROTECT_CONFIG|PROTECT_BASELINE, /* protectMask */
0, 0, 0, 0, 0, 0, 0, {{0}}, {0}, {0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0}};
/*
** Arrange for the given file to be deleted on a failure.
*/
void db_delete_on_failure(const char *zFilename){
assert( db.nDeleteOnFail<count(db.azDeleteOnFail) );
if( zFilename==0 ) return;
|
| ︙ | ︙ |
Changes to src/deltafunc.c.
| ︙ | ︙ | |||
484 485 486 487 488 489 490 | /* xCommit */ 0, /* xRollback */ 0, /* xFindMethod */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ 0, | | > | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
/* xCommit */ 0,
/* xRollback */ 0,
/* xFindMethod */ 0,
/* xRename */ 0,
/* xSavepoint */ 0,
/* xRelease */ 0,
/* xRollbackTo */ 0,
/* xShadowName */ 0,
/* xIntegrity */ 0
};
/*
** Invoke this routine to register the various delta functions.
*/
int deltafunc_init(sqlite3 *db){
int rc = SQLITE_OK;
|
| ︙ | ︙ |
Changes to src/dispatch.c.
| ︙ | ︙ | |||
1541 1542 1543 1544 1545 1546 1547 | /* xCommit */ 0, /* xRollback */ 0, /* xFindMethod */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ 0, | | > | 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 |
/* xCommit */ 0,
/* xRollback */ 0,
/* xFindMethod */ 0,
/* xRename */ 0,
/* xSavepoint */ 0,
/* xRelease */ 0,
/* xRollbackTo */ 0,
/* xShadowName */ 0,
/* xIntegrity */ 0
};
/*
** Register the helptext virtual table
*/
int helptext_vtab_register(sqlite3 *db){
|
| ︙ | ︙ |
Changes to src/foci.c.
| ︙ | ︙ | |||
266 267 268 269 270 271 272 |
0, /* xCommit */
0, /* xRollback */
0, /* xFindFunction */
0, /* xRename */
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
| | > | 266 267 268 269 270 271 272 273 274 275 276 277 278 |
0, /* xCommit */
0, /* xRollback */
0, /* xFindFunction */
0, /* xRename */
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
0, /* xShadowName */
0 /* xIntegrity */
};
sqlite3_create_module(db, "files_of_checkin", &foci_module, 0);
return SQLITE_OK;
}
|
Changes to src/login.c.
| ︙ | ︙ | |||
52 53 54 55 56 57 58 |
#include <time.h>
/*
** Compute an appropriate Anti-CSRF token into g.zCsrfToken[].
*/
static void login_create_csrf_secret(const char *zSeed){
unsigned char zResult[20];
| | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
#include <time.h>
/*
** Compute an appropriate Anti-CSRF token into g.zCsrfToken[].
*/
static void login_create_csrf_secret(const char *zSeed){
unsigned char zResult[20];
unsigned int i;
sha1sum_binary(zSeed, zResult);
for(i=0; i<sizeof(g.zCsrfToken)-1; i++){
g.zCsrfToken[i] = "abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789-/"[zResult[i]%64];
}
|
| ︙ | ︙ |
Changes to src/search.c.
| ︙ | ︙ | |||
625 626 627 628 629 630 631 632 633 634 635 636 637 638 |
}
if( bFts ){
/* Search using FTS */
Blob com;
Blob snip;
const char *zPattern = blob_str(&pattern);
int srchFlags;
if( zScope==0 ){
srchFlags = SRCH_ALL;
}else{
srchFlags = 0;
for(i=0; zScope[i]; i++){
switch( zScope[i] ){
case 'a': srchFlags = SRCH_ALL; break;
| > | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
}
if( bFts ){
/* Search using FTS */
Blob com;
Blob snip;
const char *zPattern = blob_str(&pattern);
int srchFlags;
unsigned int j;
if( zScope==0 ){
srchFlags = SRCH_ALL;
}else{
srchFlags = 0;
for(i=0; zScope[i]; i++){
switch( zScope[i] ){
case 'a': srchFlags = SRCH_ALL; break;
|
| ︙ | ︙ | |||
665 666 667 668 669 670 671 |
while( db_step(&q)==SQLITE_ROW ){
const char *zSnippet = db_column_text(&q, 0);
const char *zLabel = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 4);
const char *zScore = db_column_text(&q, 2);
const char *zId = db_column_text(&q, 3);
blob_appendf(&snip, "%s", zSnippet);
| | | | | | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
while( db_step(&q)==SQLITE_ROW ){
const char *zSnippet = db_column_text(&q, 0);
const char *zLabel = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 4);
const char *zScore = db_column_text(&q, 2);
const char *zId = db_column_text(&q, 3);
blob_appendf(&snip, "%s", zSnippet);
for(j=0; j<snip.nUsed; j++){
if( snip.aData[j]=='\n' ){
if( j>0 && snip.aData[j-1]=='\r' ) snip.aData[j-1] = ' ';
snip.aData[j] = ' ';
}
}
blob_appendf(&com, "%s\n%s\n%s", zLabel, blob_str(&snip), zDate);
if( bDebug ){
blob_appendf(&com," score: %s id: %s", zScore, zId);
}
comment_print(blob_str(&com), 0, 5, width,
|
| ︙ | ︙ |