Fossil SCM

Fix harmless compiler warnings.

drh 2014-12-01 21:19 UTC DBP-workflow
Commit c68b59b1b3974e56eb4114d1e1c91296cd26d37d
+1 -4
--- src/bundle.c
+++ src/bundle.c
@@ -115,11 +115,10 @@
115115
** Implement the "fossil bundle append BUNDLE FILE..." command. Add
116116
** the named files into the BUNDLE. Create the BUNDLE if it does not
117117
** alraedy exist.
118118
*/
119119
static void bundle_append_cmd(void){
120
- char *zFilename;
121120
Blob content, hash;
122121
int i;
123122
Stmt q;
124123
125124
verify_all_options();
@@ -164,11 +163,11 @@
164163
void subtree_from_arguments(const char *zTab){
165164
const char *zBr;
166165
const char *zFrom;
167166
const char *zTo;
168167
const char *zCkin;
169
- int rid, endRid;
168
+ int rid = 0, endRid;
170169
171170
zBr = find_option("branch",0,1);
172171
zFrom = find_option("from",0,1);
173172
zTo = find_option("to",0,1);
174173
zCkin = find_option("checkin",0,1);
@@ -539,11 +538,10 @@
539538
*/
540539
static void bundle_import_cmd(void){
541540
int forceFlag = find_option("force","f",0)!=0;
542541
int isPriv = find_option("publish",0,0)==0;
543542
char *zMissingDeltas;
544
- Stmt q;
545543
verify_all_options();
546544
bundle_attach_file(g.argv[3], "b1", 1);
547545
548546
/* Only import a bundle that was generated from a repo with the same
549547
** project code, unless the --force flag is true */
@@ -754,11 +752,10 @@
754752
** fossil bundle ls BUNDLE List content of a bundle
755753
** fossil bundle purge BUNDLE Undo an import
756754
*/
757755
void bundle_cmd(void){
758756
const char *zSubcmd;
759
- const char *zBundleFile;
760757
int n;
761758
if( g.argc<4 ) usage("SUBCOMMAND BUNDLE ?ARGUMENTS?");
762759
zSubcmd = g.argv[2];
763760
db_find_and_open_repository(0,0);
764761
n = (int)strlen(zSubcmd);
765762
--- src/bundle.c
+++ src/bundle.c
@@ -115,11 +115,10 @@
115 ** Implement the "fossil bundle append BUNDLE FILE..." command. Add
116 ** the named files into the BUNDLE. Create the BUNDLE if it does not
117 ** alraedy exist.
118 */
119 static void bundle_append_cmd(void){
120 char *zFilename;
121 Blob content, hash;
122 int i;
123 Stmt q;
124
125 verify_all_options();
@@ -164,11 +163,11 @@
164 void subtree_from_arguments(const char *zTab){
165 const char *zBr;
166 const char *zFrom;
167 const char *zTo;
168 const char *zCkin;
169 int rid, endRid;
170
171 zBr = find_option("branch",0,1);
172 zFrom = find_option("from",0,1);
173 zTo = find_option("to",0,1);
174 zCkin = find_option("checkin",0,1);
@@ -539,11 +538,10 @@
539 */
540 static void bundle_import_cmd(void){
541 int forceFlag = find_option("force","f",0)!=0;
542 int isPriv = find_option("publish",0,0)==0;
543 char *zMissingDeltas;
544 Stmt q;
545 verify_all_options();
546 bundle_attach_file(g.argv[3], "b1", 1);
547
548 /* Only import a bundle that was generated from a repo with the same
549 ** project code, unless the --force flag is true */
@@ -754,11 +752,10 @@
754 ** fossil bundle ls BUNDLE List content of a bundle
755 ** fossil bundle purge BUNDLE Undo an import
756 */
757 void bundle_cmd(void){
758 const char *zSubcmd;
759 const char *zBundleFile;
760 int n;
761 if( g.argc<4 ) usage("SUBCOMMAND BUNDLE ?ARGUMENTS?");
762 zSubcmd = g.argv[2];
763 db_find_and_open_repository(0,0);
764 n = (int)strlen(zSubcmd);
765
--- src/bundle.c
+++ src/bundle.c
@@ -115,11 +115,10 @@
115 ** Implement the "fossil bundle append BUNDLE FILE..." command. Add
116 ** the named files into the BUNDLE. Create the BUNDLE if it does not
117 ** alraedy exist.
118 */
119 static void bundle_append_cmd(void){
 
120 Blob content, hash;
121 int i;
122 Stmt q;
123
124 verify_all_options();
@@ -164,11 +163,11 @@
163 void subtree_from_arguments(const char *zTab){
164 const char *zBr;
165 const char *zFrom;
166 const char *zTo;
167 const char *zCkin;
168 int rid = 0, endRid;
169
170 zBr = find_option("branch",0,1);
171 zFrom = find_option("from",0,1);
172 zTo = find_option("to",0,1);
173 zCkin = find_option("checkin",0,1);
@@ -539,11 +538,10 @@
538 */
539 static void bundle_import_cmd(void){
540 int forceFlag = find_option("force","f",0)!=0;
541 int isPriv = find_option("publish",0,0)==0;
542 char *zMissingDeltas;
 
543 verify_all_options();
544 bundle_attach_file(g.argv[3], "b1", 1);
545
546 /* Only import a bundle that was generated from a repo with the same
547 ** project code, unless the --force flag is true */
@@ -754,11 +752,10 @@
752 ** fossil bundle ls BUNDLE List content of a bundle
753 ** fossil bundle purge BUNDLE Undo an import
754 */
755 void bundle_cmd(void){
756 const char *zSubcmd;
 
757 int n;
758 if( g.argc<4 ) usage("SUBCOMMAND BUNDLE ?ARGUMENTS?");
759 zSubcmd = g.argv[2];
760 db_find_and_open_repository(0,0);
761 n = (int)strlen(zSubcmd);
762
-3
--- src/name.c
+++ src/name.c
@@ -801,13 +801,10 @@
801801
** Create the description table if it does not already exists.
802802
** Populate fields of this table with descriptions for all artifacts
803803
** whose RID matches the SQL expression in zWhere.
804804
*/
805805
void describe_artifacts(const char *zWhere){
806
- Stmt q;
807
- Stmt ins;
808
-
809806
db_multi_exec("%s", zDescTab/*safe-for-%s*/);
810807
811808
/* Describe checkins */
812809
db_multi_exec(
813810
"INSERT OR IGNORE INTO description(rid,uuid,ctime,type,summary)\n"
814811
--- src/name.c
+++ src/name.c
@@ -801,13 +801,10 @@
801 ** Create the description table if it does not already exists.
802 ** Populate fields of this table with descriptions for all artifacts
803 ** whose RID matches the SQL expression in zWhere.
804 */
805 void describe_artifacts(const char *zWhere){
806 Stmt q;
807 Stmt ins;
808
809 db_multi_exec("%s", zDescTab/*safe-for-%s*/);
810
811 /* Describe checkins */
812 db_multi_exec(
813 "INSERT OR IGNORE INTO description(rid,uuid,ctime,type,summary)\n"
814
--- src/name.c
+++ src/name.c
@@ -801,13 +801,10 @@
801 ** Create the description table if it does not already exists.
802 ** Populate fields of this table with descriptions for all artifacts
803 ** whose RID matches the SQL expression in zWhere.
804 */
805 void describe_artifacts(const char *zWhere){
 
 
 
806 db_multi_exec("%s", zDescTab/*safe-for-%s*/);
807
808 /* Describe checkins */
809 db_multi_exec(
810 "INSERT OR IGNORE INTO description(rid,uuid,ctime,type,summary)\n"
811
--- src/purge.c
+++ src/purge.c
@@ -477,11 +477,10 @@
477477
if( g.argc<3 ) usage("SUBCOMMAND ?ARGS?");
478478
zSubcmd = g.argv[2];
479479
db_find_and_open_repository(0,0);
480480
n = (int)strlen(zSubcmd);
481481
if( strncmp(zSubcmd, "cat", n)==0 ){
482
- const char *zOutFile;
483482
int i, piid;
484483
Blob content;
485484
if( g.argc<4 ) usage("cat UUID...");
486485
for(i=3; i<g.argc; i++){
487486
piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
@@ -549,11 +548,10 @@
549548
db_end_transaction(0);
550549
}else{
551550
/* The "checkins" command is the default and so must occur last */
552551
int explainOnly = find_option("explain",0,0)!=0;
553552
int dryRun = find_option("dry-run",0,0)!=0;
554
- const char *zTag;
555553
int i;
556554
int vid;
557555
int nCkin;
558556
int nArtifact;
559557
verify_all_options();
560558
--- src/purge.c
+++ src/purge.c
@@ -477,11 +477,10 @@
477 if( g.argc<3 ) usage("SUBCOMMAND ?ARGS?");
478 zSubcmd = g.argv[2];
479 db_find_and_open_repository(0,0);
480 n = (int)strlen(zSubcmd);
481 if( strncmp(zSubcmd, "cat", n)==0 ){
482 const char *zOutFile;
483 int i, piid;
484 Blob content;
485 if( g.argc<4 ) usage("cat UUID...");
486 for(i=3; i<g.argc; i++){
487 piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
@@ -549,11 +548,10 @@
549 db_end_transaction(0);
550 }else{
551 /* The "checkins" command is the default and so must occur last */
552 int explainOnly = find_option("explain",0,0)!=0;
553 int dryRun = find_option("dry-run",0,0)!=0;
554 const char *zTag;
555 int i;
556 int vid;
557 int nCkin;
558 int nArtifact;
559 verify_all_options();
560
--- src/purge.c
+++ src/purge.c
@@ -477,11 +477,10 @@
477 if( g.argc<3 ) usage("SUBCOMMAND ?ARGS?");
478 zSubcmd = g.argv[2];
479 db_find_and_open_repository(0,0);
480 n = (int)strlen(zSubcmd);
481 if( strncmp(zSubcmd, "cat", n)==0 ){
 
482 int i, piid;
483 Blob content;
484 if( g.argc<4 ) usage("cat UUID...");
485 for(i=3; i<g.argc; i++){
486 piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
@@ -549,11 +548,10 @@
548 db_end_transaction(0);
549 }else{
550 /* The "checkins" command is the default and so must occur last */
551 int explainOnly = find_option("explain",0,0)!=0;
552 int dryRun = find_option("dry-run",0,0)!=0;
 
553 int i;
554 int vid;
555 int nCkin;
556 int nArtifact;
557 verify_all_options();
558
-1
--- src/shun.c
+++ src/shun.c
@@ -432,11 +432,10 @@
432432
" WHERE blob.rcvid=%d", rcvid
433433
);
434434
@ <tr><th valign="top" align="right">Artifacts:</th>
435435
@ <td valign="top">
436436
while( db_step(&q)==SQLITE_ROW ){
437
- int rid = db_column_int(&q, 0);
438437
const char *zUuid = db_column_text(&q, 1);
439438
int size = db_column_int(&q, 2);
440439
const char *zDesc = db_column_text(&q, 3);
441440
if( zDesc==0 ) zDesc = "";
442441
@ <a href="%s(g.zTop)/info/%s(zUuid)">%s(zUuid)</a>
443442
--- src/shun.c
+++ src/shun.c
@@ -432,11 +432,10 @@
432 " WHERE blob.rcvid=%d", rcvid
433 );
434 @ <tr><th valign="top" align="right">Artifacts:</th>
435 @ <td valign="top">
436 while( db_step(&q)==SQLITE_ROW ){
437 int rid = db_column_int(&q, 0);
438 const char *zUuid = db_column_text(&q, 1);
439 int size = db_column_int(&q, 2);
440 const char *zDesc = db_column_text(&q, 3);
441 if( zDesc==0 ) zDesc = "";
442 @ <a href="%s(g.zTop)/info/%s(zUuid)">%s(zUuid)</a>
443
--- src/shun.c
+++ src/shun.c
@@ -432,11 +432,10 @@
432 " WHERE blob.rcvid=%d", rcvid
433 );
434 @ <tr><th valign="top" align="right">Artifacts:</th>
435 @ <td valign="top">
436 while( db_step(&q)==SQLITE_ROW ){
 
437 const char *zUuid = db_column_text(&q, 1);
438 int size = db_column_int(&q, 2);
439 const char *zDesc = db_column_text(&q, 3);
440 if( zDesc==0 ) zDesc = "";
441 @ <a href="%s(g.zTop)/info/%s(zUuid)">%s(zUuid)</a>
442

Keyboard Shortcuts

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