Fossil SCM

Eliminate some gcc (4.6) warnings: <br>src/checkin.c: In function &#x2018;create_manifest&#x2019;: <br>src/checkin.c:661:7: warning: variable \u2018n;Basename&#x2019; set but not used [-Wunused-but-set-variable] <br>src/info.c: In function &#x2018;ci_page&#x2019;: <br>src/info.c:484:17: warning: variable &#x2018;zBranch&#x2019; set but not used [-Wunused-but-set-variable]

jan.nijtmans 2012-09-05 20:21 trunk
Commit 1854d99041f6768d4da908c6bf3a1a38cf299e40
2 files changed +4 +4
--- src/checkin.c
+++ src/checkin.c
@@ -656,11 +656,13 @@
656656
int *pnFBcard /* Number of generated B- and F-cards */
657657
){
658658
char *zDate; /* Date of the check-in */
659659
char *zParentUuid; /* UUID of parent check-in */
660660
Blob filename; /* A single filename */
661
+#if !defined(_WIN32)
661662
int nBasename; /* Size of base filename */
663
+#endif
662664
Stmt q; /* Query of files changed */
663665
Stmt q2; /* Query of merge parents */
664666
Blob mcksum; /* Manifest checksum */
665667
ManifestFile *pFile; /* File from the baseline */
666668
int nFBcard = 0; /* Number of B-cards and F-cards */
@@ -690,11 +692,13 @@
690692
" AND vfile.vid=%d"
691693
" ORDER BY if_selected(vfile.id, pathname, origname)",
692694
vid);
693695
blob_zero(&filename);
694696
blob_appendf(&filename, "%s", g.zLocalRoot);
697
+#if !defined(_WIN32)
695698
nBasename = blob_size(&filename);
699
+#endif
696700
while( db_step(&q)==SQLITE_ROW ){
697701
const char *zName = db_column_text(&q, 0);
698702
const char *zUuid = db_column_text(&q, 1);
699703
const char *zOrig = db_column_text(&q, 2);
700704
int frid = db_column_int(&q, 3);
701705
--- 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 @@
479479
char *zEUser, *zEComment;
480480
const char *zUser;
481481
const char *zComment;
482482
const char *zDate;
483483
const char *zOrigDate;
484
+#if 0
484485
const char *zBranch;
486
+#endif
485487
style_header(zTitle);
486488
login_anonymous_available();
487489
free(zTitle);
488490
zEUser = db_text(0,
489491
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
490492
TAG_USER, rid);
491493
zEComment = db_text(0,
492494
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
493495
TAG_COMMENT, rid);
496
+#if 0
494497
zBranch = db_text("trunk",
495498
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
496499
TAG_BRANCH, rid);
500
+#endif
497501
zUser = db_column_text(&q, 2);
498502
zComment = db_column_text(&q, 3);
499503
zDate = db_column_text(&q,1);
500504
zOrigDate = db_column_text(&q, 4);
501505
@ <div class="section">Overview</div>
502506
--- 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

Keyboard Shortcuts

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