Fossil SCM
Eliminate some gcc (4.6) warnings: <br>src/checkin.c: In function ‘create_manifest’: <br>src/checkin.c:661:7: warning: variable \u2018n;Basename’ set but not used [-Wunused-but-set-variable] <br>src/info.c: In function ‘ci_page’: <br>src/info.c:484:17: warning: variable ‘zBranch’ set but not used [-Wunused-but-set-variable]
Commit
1854d99041f6768d4da908c6bf3a1a38cf299e40
Parent
16ab9f25ff4d911…
2 files changed
+4
+4
+4
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -656,11 +656,13 @@ | ||
| 656 | 656 | int *pnFBcard /* Number of generated B- and F-cards */ |
| 657 | 657 | ){ |
| 658 | 658 | char *zDate; /* Date of the check-in */ |
| 659 | 659 | char *zParentUuid; /* UUID of parent check-in */ |
| 660 | 660 | Blob filename; /* A single filename */ |
| 661 | +#if !defined(_WIN32) | |
| 661 | 662 | int nBasename; /* Size of base filename */ |
| 663 | +#endif | |
| 662 | 664 | Stmt q; /* Query of files changed */ |
| 663 | 665 | Stmt q2; /* Query of merge parents */ |
| 664 | 666 | Blob mcksum; /* Manifest checksum */ |
| 665 | 667 | ManifestFile *pFile; /* File from the baseline */ |
| 666 | 668 | int nFBcard = 0; /* Number of B-cards and F-cards */ |
| @@ -690,11 +692,13 @@ | ||
| 690 | 692 | " AND vfile.vid=%d" |
| 691 | 693 | " ORDER BY if_selected(vfile.id, pathname, origname)", |
| 692 | 694 | vid); |
| 693 | 695 | blob_zero(&filename); |
| 694 | 696 | blob_appendf(&filename, "%s", g.zLocalRoot); |
| 697 | +#if !defined(_WIN32) | |
| 695 | 698 | nBasename = blob_size(&filename); |
| 699 | +#endif | |
| 696 | 700 | while( db_step(&q)==SQLITE_ROW ){ |
| 697 | 701 | const char *zName = db_column_text(&q, 0); |
| 698 | 702 | const char *zUuid = db_column_text(&q, 1); |
| 699 | 703 | const char *zOrig = db_column_text(&q, 2); |
| 700 | 704 | int frid = db_column_int(&q, 3); |
| 701 | 705 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -656,11 +656,13 @@ | |
| 656 | int *pnFBcard /* Number of generated B- and F-cards */ |
| 657 | ){ |
| 658 | char *zDate; /* Date of the check-in */ |
| 659 | char *zParentUuid; /* UUID of parent check-in */ |
| 660 | Blob filename; /* A single filename */ |
| 661 | int nBasename; /* Size of base filename */ |
| 662 | Stmt q; /* Query of files changed */ |
| 663 | Stmt q2; /* Query of merge parents */ |
| 664 | Blob mcksum; /* Manifest checksum */ |
| 665 | ManifestFile *pFile; /* File from the baseline */ |
| 666 | int nFBcard = 0; /* Number of B-cards and F-cards */ |
| @@ -690,11 +692,13 @@ | |
| 690 | " AND vfile.vid=%d" |
| 691 | " ORDER BY if_selected(vfile.id, pathname, origname)", |
| 692 | vid); |
| 693 | blob_zero(&filename); |
| 694 | blob_appendf(&filename, "%s", g.zLocalRoot); |
| 695 | nBasename = blob_size(&filename); |
| 696 | while( db_step(&q)==SQLITE_ROW ){ |
| 697 | const char *zName = db_column_text(&q, 0); |
| 698 | const char *zUuid = db_column_text(&q, 1); |
| 699 | const char *zOrig = db_column_text(&q, 2); |
| 700 | int frid = db_column_int(&q, 3); |
| 701 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -656,11 +656,13 @@ | |
| 656 | int *pnFBcard /* Number of generated B- and F-cards */ |
| 657 | ){ |
| 658 | char *zDate; /* Date of the check-in */ |
| 659 | char *zParentUuid; /* UUID of parent check-in */ |
| 660 | Blob filename; /* A single filename */ |
| 661 | #if !defined(_WIN32) |
| 662 | int nBasename; /* Size of base filename */ |
| 663 | #endif |
| 664 | Stmt q; /* Query of files changed */ |
| 665 | Stmt q2; /* Query of merge parents */ |
| 666 | Blob mcksum; /* Manifest checksum */ |
| 667 | ManifestFile *pFile; /* File from the baseline */ |
| 668 | int nFBcard = 0; /* Number of B-cards and F-cards */ |
| @@ -690,11 +692,13 @@ | |
| 692 | " AND vfile.vid=%d" |
| 693 | " ORDER BY if_selected(vfile.id, pathname, origname)", |
| 694 | vid); |
| 695 | blob_zero(&filename); |
| 696 | blob_appendf(&filename, "%s", g.zLocalRoot); |
| 697 | #if !defined(_WIN32) |
| 698 | nBasename = blob_size(&filename); |
| 699 | #endif |
| 700 | while( db_step(&q)==SQLITE_ROW ){ |
| 701 | const char *zName = db_column_text(&q, 0); |
| 702 | const char *zUuid = db_column_text(&q, 1); |
| 703 | const char *zOrig = db_column_text(&q, 2); |
| 704 | int frid = db_column_int(&q, 3); |
| 705 |
+4
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -479,23 +479,27 @@ | ||
| 479 | 479 | char *zEUser, *zEComment; |
| 480 | 480 | const char *zUser; |
| 481 | 481 | const char *zComment; |
| 482 | 482 | const char *zDate; |
| 483 | 483 | const char *zOrigDate; |
| 484 | +#if 0 | |
| 484 | 485 | const char *zBranch; |
| 486 | +#endif | |
| 485 | 487 | style_header(zTitle); |
| 486 | 488 | login_anonymous_available(); |
| 487 | 489 | free(zTitle); |
| 488 | 490 | zEUser = db_text(0, |
| 489 | 491 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 490 | 492 | TAG_USER, rid); |
| 491 | 493 | zEComment = db_text(0, |
| 492 | 494 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 493 | 495 | TAG_COMMENT, rid); |
| 496 | +#if 0 | |
| 494 | 497 | zBranch = db_text("trunk", |
| 495 | 498 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 496 | 499 | TAG_BRANCH, rid); |
| 500 | +#endif | |
| 497 | 501 | zUser = db_column_text(&q, 2); |
| 498 | 502 | zComment = db_column_text(&q, 3); |
| 499 | 503 | zDate = db_column_text(&q,1); |
| 500 | 504 | zOrigDate = db_column_text(&q, 4); |
| 501 | 505 | @ <div class="section">Overview</div> |
| 502 | 506 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -479,23 +479,27 @@ | |
| 479 | char *zEUser, *zEComment; |
| 480 | const char *zUser; |
| 481 | const char *zComment; |
| 482 | const char *zDate; |
| 483 | const char *zOrigDate; |
| 484 | const char *zBranch; |
| 485 | style_header(zTitle); |
| 486 | login_anonymous_available(); |
| 487 | free(zTitle); |
| 488 | zEUser = db_text(0, |
| 489 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 490 | TAG_USER, rid); |
| 491 | zEComment = db_text(0, |
| 492 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 493 | TAG_COMMENT, rid); |
| 494 | zBranch = db_text("trunk", |
| 495 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 496 | TAG_BRANCH, rid); |
| 497 | zUser = db_column_text(&q, 2); |
| 498 | zComment = db_column_text(&q, 3); |
| 499 | zDate = db_column_text(&q,1); |
| 500 | zOrigDate = db_column_text(&q, 4); |
| 501 | @ <div class="section">Overview</div> |
| 502 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -479,23 +479,27 @@ | |
| 479 | char *zEUser, *zEComment; |
| 480 | const char *zUser; |
| 481 | const char *zComment; |
| 482 | const char *zDate; |
| 483 | const char *zOrigDate; |
| 484 | #if 0 |
| 485 | const char *zBranch; |
| 486 | #endif |
| 487 | style_header(zTitle); |
| 488 | login_anonymous_available(); |
| 489 | free(zTitle); |
| 490 | zEUser = db_text(0, |
| 491 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 492 | TAG_USER, rid); |
| 493 | zEComment = db_text(0, |
| 494 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 495 | TAG_COMMENT, rid); |
| 496 | #if 0 |
| 497 | zBranch = db_text("trunk", |
| 498 | "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d", |
| 499 | TAG_BRANCH, rid); |
| 500 | #endif |
| 501 | zUser = db_column_text(&q, 2); |
| 502 | zComment = db_column_text(&q, 3); |
| 503 | zDate = db_column_text(&q,1); |
| 504 | zOrigDate = db_column_text(&q, 4); |
| 505 | @ <div class="section">Overview</div> |
| 506 |