Fossil SCM

Fix new and harmless compiler warnings that appeared with the upgrade to GCC 4.6.1.

drh 2011-10-16 17:32 trunk
Commit d8bbe4add6af4799aca98d0be1bf118ac8bf2f64
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -135,11 +135,11 @@
135135
}
136136
137137
/*
138138
** Return a pointer to the HTTP reply text.
139139
*/
140
-char *cgi_extract_content(int *pnAmt){
140
+char *cgi_extract_content(void){
141141
cgi_combine_header_and_body();
142142
return blob_buffer(&cgiContent[0]);
143143
}
144144
145145
/*
146146
--- src/cgi.c
+++ src/cgi.c
@@ -135,11 +135,11 @@
135 }
136
137 /*
138 ** Return a pointer to the HTTP reply text.
139 */
140 char *cgi_extract_content(int *pnAmt){
141 cgi_combine_header_and_body();
142 return blob_buffer(&cgiContent[0]);
143 }
144
145 /*
146
--- src/cgi.c
+++ src/cgi.c
@@ -135,11 +135,11 @@
135 }
136
137 /*
138 ** Return a pointer to the HTTP reply text.
139 */
140 char *cgi_extract_content(void){
141 cgi_combine_header_and_body();
142 return blob_buffer(&cgiContent[0]);
143 }
144
145 /*
146
--- src/checkin.c
+++ src/checkin.c
@@ -282,18 +282,16 @@
282282
Stmt q;
283283
int n;
284284
const char *zIgnoreFlag = find_option("ignore",0,1);
285285
int allFlag = find_option("dotfiles",0,0)!=0;
286286
int cwdRelative = 0;
287
- int outputManifest;
288287
Glob *pIgnore;
289288
Blob rewrittenPathname;
290289
const char *zPathname, *zDisplayName;
291290
292291
db_must_be_within_tree();
293292
cwdRelative = determine_cwd_relative_option();
294
- outputManifest = db_get_boolean("manifest",0);
295293
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
296294
n = strlen(g.zLocalRoot);
297295
blob_init(&path, g.zLocalRoot, n-1);
298296
if( zIgnoreFlag==0 ){
299297
zIgnoreFlag = db_get("ignore-glob", 0);
300298
--- src/checkin.c
+++ src/checkin.c
@@ -282,18 +282,16 @@
282 Stmt q;
283 int n;
284 const char *zIgnoreFlag = find_option("ignore",0,1);
285 int allFlag = find_option("dotfiles",0,0)!=0;
286 int cwdRelative = 0;
287 int outputManifest;
288 Glob *pIgnore;
289 Blob rewrittenPathname;
290 const char *zPathname, *zDisplayName;
291
292 db_must_be_within_tree();
293 cwdRelative = determine_cwd_relative_option();
294 outputManifest = db_get_boolean("manifest",0);
295 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
296 n = strlen(g.zLocalRoot);
297 blob_init(&path, g.zLocalRoot, n-1);
298 if( zIgnoreFlag==0 ){
299 zIgnoreFlag = db_get("ignore-glob", 0);
300
--- src/checkin.c
+++ src/checkin.c
@@ -282,18 +282,16 @@
282 Stmt q;
283 int n;
284 const char *zIgnoreFlag = find_option("ignore",0,1);
285 int allFlag = find_option("dotfiles",0,0)!=0;
286 int cwdRelative = 0;
 
287 Glob *pIgnore;
288 Blob rewrittenPathname;
289 const char *zPathname, *zDisplayName;
290
291 db_must_be_within_tree();
292 cwdRelative = determine_cwd_relative_option();
 
293 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
294 n = strlen(g.zLocalRoot);
295 blob_init(&path, g.zLocalRoot, n-1);
296 if( zIgnoreFlag==0 ){
297 zIgnoreFlag = db_get("ignore-glob", 0);
298
--- src/http_transport.c
+++ src/http_transport.c
@@ -265,14 +265,12 @@
265265
void transport_send(Blob *toSend){
266266
char *z = blob_buffer(toSend);
267267
int n = blob_size(toSend);
268268
transport.nSent += n;
269269
if( g.urlIsSsh ){
270
- int sent;
271
- sent = fwrite(z, 1, n, sshOut);
270
+ fwrite(z, 1, n, sshOut);
272271
fflush(sshOut);
273
- /* printf("sent %d of %d bytes\n", sent, n); fflush(stdout); */
274272
}else if( g.urlIsHttps ){
275273
#ifdef FOSSIL_ENABLE_SSL
276274
int sent;
277275
while( n>0 ){
278276
sent = ssl_send(0, z, n);
279277
--- src/http_transport.c
+++ src/http_transport.c
@@ -265,14 +265,12 @@
265 void transport_send(Blob *toSend){
266 char *z = blob_buffer(toSend);
267 int n = blob_size(toSend);
268 transport.nSent += n;
269 if( g.urlIsSsh ){
270 int sent;
271 sent = fwrite(z, 1, n, sshOut);
272 fflush(sshOut);
273 /* printf("sent %d of %d bytes\n", sent, n); fflush(stdout); */
274 }else if( g.urlIsHttps ){
275 #ifdef FOSSIL_ENABLE_SSL
276 int sent;
277 while( n>0 ){
278 sent = ssl_send(0, z, n);
279
--- src/http_transport.c
+++ src/http_transport.c
@@ -265,14 +265,12 @@
265 void transport_send(Blob *toSend){
266 char *z = blob_buffer(toSend);
267 int n = blob_size(toSend);
268 transport.nSent += n;
269 if( g.urlIsSsh ){
270 fwrite(z, 1, n, sshOut);
 
271 fflush(sshOut);
 
272 }else if( g.urlIsHttps ){
273 #ifdef FOSSIL_ENABLE_SSL
274 int sent;
275 while( n>0 ){
276 sent = ssl_send(0, z, n);
277
+3 -19
--- src/report.c
+++ src/report.c
@@ -630,17 +630,11 @@
630630
char **azName /* Names of the columns */
631631
){
632632
struct GenerateHTML *pState = (struct GenerateHTML*)pUser;
633633
int i;
634634
const char *zTid; /* Ticket UUID. (value of column named '#') */
635
- int rn; /* Report number */
636635
char *zBg = 0; /* Use this background color */
637
- char zPage[30]; /* Text version of the ticket number */
638
-
639
- /* Get the report number
640
- */
641
- rn = pState->rn;
642636
643637
/* Do initialization
644638
*/
645639
if( pState->nCount==0 ){
646640
/* Turn off the authorizer. It is no longer doing anything since the
@@ -719,11 +713,10 @@
719713
*/
720714
zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0;
721715
if( zBg==0 ) zBg = "white";
722716
@ <tr style="background-color:%h(zBg)">
723717
zTid = 0;
724
- zPage[0] = 0;
725718
for(i=0; i<nArg; i++){
726719
char *zData;
727720
if( i==pState->iBg ) continue;
728721
zData = azArg[i];
729722
if( zData==0 ) zData = "";
@@ -1108,41 +1101,32 @@
11081101
const char *zFilter,
11091102
tTktShowEncoding enc
11101103
){
11111104
Stmt q;
11121105
char *zSql;
1113
- const char *zTitle;
1114
- const char *zOwner;
1115
- const char *zClrKey;
11161106
char *zErr1 = 0;
11171107
char *zErr2 = 0;
11181108
int count = 0;
11191109
int rn;
11201110
11211111
if (!zRep || !strcmp(zRep,zFullTicketRptRn) || !strcmp(zRep,zFullTicketRptTitle) ){
1122
- zTitle = zFullTicketRptTitle;
11231112
zSql = "SELECT * FROM ticket";
1124
- zOwner = g.zLogin;
1125
- zClrKey = "";
11261113
}else{
11271114
rn = atoi(zRep);
11281115
if( rn ){
11291116
db_prepare(&q,
1130
- "SELECT title, sqlcode, owner, cols FROM reportfmt WHERE rn=%d", rn);
1117
+ "SELECT sqlcode FROM reportfmt WHERE rn=%d", rn);
11311118
}else{
11321119
db_prepare(&q,
1133
- "SELECT title, sqlcode, owner, cols FROM reportfmt WHERE title='%s'", zRep);
1120
+ "SELECT sqlcode FROM reportfmt WHERE title='%s'", zRep);
11341121
}
11351122
if( db_step(&q)!=SQLITE_ROW ){
11361123
db_finalize(&q);
11371124
rpt_list_reports();
11381125
fossil_fatal("unknown report format(%s)!",zRep);
11391126
}
1140
- zTitle = db_column_malloc(&q, 0);
1141
- zSql = db_column_malloc(&q, 1);
1142
- zOwner = db_column_malloc(&q, 2);
1143
- zClrKey = db_column_malloc(&q, 3);
1127
+ zSql = db_column_malloc(&q, 0);
11441128
db_finalize(&q);
11451129
}
11461130
if( zFilter ){
11471131
zSql = mprintf("SELECT * FROM (%s) WHERE %s",zSql,zFilter);
11481132
}
11491133
--- src/report.c
+++ src/report.c
@@ -630,17 +630,11 @@
630 char **azName /* Names of the columns */
631 ){
632 struct GenerateHTML *pState = (struct GenerateHTML*)pUser;
633 int i;
634 const char *zTid; /* Ticket UUID. (value of column named '#') */
635 int rn; /* Report number */
636 char *zBg = 0; /* Use this background color */
637 char zPage[30]; /* Text version of the ticket number */
638
639 /* Get the report number
640 */
641 rn = pState->rn;
642
643 /* Do initialization
644 */
645 if( pState->nCount==0 ){
646 /* Turn off the authorizer. It is no longer doing anything since the
@@ -719,11 +713,10 @@
719 */
720 zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0;
721 if( zBg==0 ) zBg = "white";
722 @ <tr style="background-color:%h(zBg)">
723 zTid = 0;
724 zPage[0] = 0;
725 for(i=0; i<nArg; i++){
726 char *zData;
727 if( i==pState->iBg ) continue;
728 zData = azArg[i];
729 if( zData==0 ) zData = "";
@@ -1108,41 +1101,32 @@
1108 const char *zFilter,
1109 tTktShowEncoding enc
1110 ){
1111 Stmt q;
1112 char *zSql;
1113 const char *zTitle;
1114 const char *zOwner;
1115 const char *zClrKey;
1116 char *zErr1 = 0;
1117 char *zErr2 = 0;
1118 int count = 0;
1119 int rn;
1120
1121 if (!zRep || !strcmp(zRep,zFullTicketRptRn) || !strcmp(zRep,zFullTicketRptTitle) ){
1122 zTitle = zFullTicketRptTitle;
1123 zSql = "SELECT * FROM ticket";
1124 zOwner = g.zLogin;
1125 zClrKey = "";
1126 }else{
1127 rn = atoi(zRep);
1128 if( rn ){
1129 db_prepare(&q,
1130 "SELECT title, sqlcode, owner, cols FROM reportfmt WHERE rn=%d", rn);
1131 }else{
1132 db_prepare(&q,
1133 "SELECT title, sqlcode, owner, cols FROM reportfmt WHERE title='%s'", zRep);
1134 }
1135 if( db_step(&q)!=SQLITE_ROW ){
1136 db_finalize(&q);
1137 rpt_list_reports();
1138 fossil_fatal("unknown report format(%s)!",zRep);
1139 }
1140 zTitle = db_column_malloc(&q, 0);
1141 zSql = db_column_malloc(&q, 1);
1142 zOwner = db_column_malloc(&q, 2);
1143 zClrKey = db_column_malloc(&q, 3);
1144 db_finalize(&q);
1145 }
1146 if( zFilter ){
1147 zSql = mprintf("SELECT * FROM (%s) WHERE %s",zSql,zFilter);
1148 }
1149
--- src/report.c
+++ src/report.c
@@ -630,17 +630,11 @@
630 char **azName /* Names of the columns */
631 ){
632 struct GenerateHTML *pState = (struct GenerateHTML*)pUser;
633 int i;
634 const char *zTid; /* Ticket UUID. (value of column named '#') */
 
635 char *zBg = 0; /* Use this background color */
 
 
 
 
 
636
637 /* Do initialization
638 */
639 if( pState->nCount==0 ){
640 /* Turn off the authorizer. It is no longer doing anything since the
@@ -719,11 +713,10 @@
713 */
714 zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0;
715 if( zBg==0 ) zBg = "white";
716 @ <tr style="background-color:%h(zBg)">
717 zTid = 0;
 
718 for(i=0; i<nArg; i++){
719 char *zData;
720 if( i==pState->iBg ) continue;
721 zData = azArg[i];
722 if( zData==0 ) zData = "";
@@ -1108,41 +1101,32 @@
1101 const char *zFilter,
1102 tTktShowEncoding enc
1103 ){
1104 Stmt q;
1105 char *zSql;
 
 
 
1106 char *zErr1 = 0;
1107 char *zErr2 = 0;
1108 int count = 0;
1109 int rn;
1110
1111 if (!zRep || !strcmp(zRep,zFullTicketRptRn) || !strcmp(zRep,zFullTicketRptTitle) ){
 
1112 zSql = "SELECT * FROM ticket";
 
 
1113 }else{
1114 rn = atoi(zRep);
1115 if( rn ){
1116 db_prepare(&q,
1117 "SELECT sqlcode FROM reportfmt WHERE rn=%d", rn);
1118 }else{
1119 db_prepare(&q,
1120 "SELECT sqlcode FROM reportfmt WHERE title='%s'", zRep);
1121 }
1122 if( db_step(&q)!=SQLITE_ROW ){
1123 db_finalize(&q);
1124 rpt_list_reports();
1125 fossil_fatal("unknown report format(%s)!",zRep);
1126 }
1127 zSql = db_column_malloc(&q, 0);
 
 
 
1128 db_finalize(&q);
1129 }
1130 if( zFilter ){
1131 zSql = mprintf("SELECT * FROM (%s) WHERE %s",zSql,zFilter);
1132 }
1133
--- src/skins.c
+++ src/skins.c
@@ -1100,10 +1100,13 @@
11001100
db_multi_exec("%s", zCurrent);
11011101
}
11021102
}
11031103
11041104
style_header("Skins");
1105
+ if( zErr ){
1106
+ @ <p><font color="red">%h(zErr)</font></p>
1107
+ }
11051108
@ <p>A "skin" is a combination of
11061109
@ <a href="setup_editcss">CSS</a>,
11071110
@ <a href="setup_header">Header</a>,
11081111
@ <a href="setup_footer">Footer</a>, and
11091112
@ <a href="setup_logo">Logo</a> that determines the look and feel
11101113
--- src/skins.c
+++ src/skins.c
@@ -1100,10 +1100,13 @@
1100 db_multi_exec("%s", zCurrent);
1101 }
1102 }
1103
1104 style_header("Skins");
 
 
 
1105 @ <p>A "skin" is a combination of
1106 @ <a href="setup_editcss">CSS</a>,
1107 @ <a href="setup_header">Header</a>,
1108 @ <a href="setup_footer">Footer</a>, and
1109 @ <a href="setup_logo">Logo</a> that determines the look and feel
1110
--- src/skins.c
+++ src/skins.c
@@ -1100,10 +1100,13 @@
1100 db_multi_exec("%s", zCurrent);
1101 }
1102 }
1103
1104 style_header("Skins");
1105 if( zErr ){
1106 @ <p><font color="red">%h(zErr)</font></p>
1107 }
1108 @ <p>A "skin" is a combination of
1109 @ <a href="setup_editcss">CSS</a>,
1110 @ <a href="setup_header">Header</a>,
1111 @ <a href="setup_footer">Footer</a>, and
1112 @ <a href="setup_logo">Logo</a> that determines the look and feel
1113
-2
--- src/tkt.c
+++ src/tkt.c
@@ -170,11 +170,10 @@
170170
*/
171171
int ticket_insert(const Manifest *p, int createFlag, int rid){
172172
Blob sql;
173173
Stmt q;
174174
int i;
175
- const char *zSep;
176175
int rc = 0;
177176
178177
getAllTicketFields();
179178
if( createFlag ){
180179
db_multi_exec("INSERT OR IGNORE INTO ticket(tkt_uuid, tkt_mtime) "
@@ -181,11 +180,10 @@
181180
"VALUES(%Q, 0)", p->zTicketUuid);
182181
rc = db_changes();
183182
}
184183
blob_zero(&sql);
185184
blob_appendf(&sql, "UPDATE OR REPLACE ticket SET tkt_mtime=:mtime");
186
- zSep = "SET";
187185
for(i=0; i<p->nField; i++){
188186
const char *zName = p->aField[i].zName;
189187
if( zName[0]=='+' ){
190188
zName++;
191189
if( fieldId(zName)<0 ) continue;
192190
--- src/tkt.c
+++ src/tkt.c
@@ -170,11 +170,10 @@
170 */
171 int ticket_insert(const Manifest *p, int createFlag, int rid){
172 Blob sql;
173 Stmt q;
174 int i;
175 const char *zSep;
176 int rc = 0;
177
178 getAllTicketFields();
179 if( createFlag ){
180 db_multi_exec("INSERT OR IGNORE INTO ticket(tkt_uuid, tkt_mtime) "
@@ -181,11 +180,10 @@
181 "VALUES(%Q, 0)", p->zTicketUuid);
182 rc = db_changes();
183 }
184 blob_zero(&sql);
185 blob_appendf(&sql, "UPDATE OR REPLACE ticket SET tkt_mtime=:mtime");
186 zSep = "SET";
187 for(i=0; i<p->nField; i++){
188 const char *zName = p->aField[i].zName;
189 if( zName[0]=='+' ){
190 zName++;
191 if( fieldId(zName)<0 ) continue;
192
--- src/tkt.c
+++ src/tkt.c
@@ -170,11 +170,10 @@
170 */
171 int ticket_insert(const Manifest *p, int createFlag, int rid){
172 Blob sql;
173 Stmt q;
174 int i;
 
175 int rc = 0;
176
177 getAllTicketFields();
178 if( createFlag ){
179 db_multi_exec("INSERT OR IGNORE INTO ticket(tkt_uuid, tkt_mtime) "
@@ -181,11 +180,10 @@
180 "VALUES(%Q, 0)", p->zTicketUuid);
181 rc = db_changes();
182 }
183 blob_zero(&sql);
184 blob_appendf(&sql, "UPDATE OR REPLACE ticket SET tkt_mtime=:mtime");
 
185 for(i=0; i<p->nField; i++){
186 const char *zName = p->aField[i].zName;
187 if( zName[0]=='+' ){
188 zName++;
189 if( fieldId(zName)<0 ) continue;
190
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1708,20 +1708,18 @@
17081708
/* Enter <verbatim> processing. With verbatim enabled, all other
17091709
** markup other than the corresponding end-tag with the same ID is
17101710
** ignored.
17111711
*/
17121712
if( markup.iCode==MARKUP_VERBATIM ){
1713
- int vAttrIdx, vAttrDidAppend=0;
1713
+ int vAttrIdx;
17141714
renderer.zVerbatimId = 0;
17151715
renderer.inVerbatim = 1;
17161716
renderer.preVerbState = renderer.state;
17171717
renderer.state &= ~ALLOW_WIKI;
17181718
for (vAttrIdx = 0; vAttrIdx < markup.nAttr; vAttrIdx++){
17191719
if( markup.aAttr[vAttrIdx].iACode == ATTR_ID ){
17201720
renderer.zVerbatimId = markup.aAttr[0].zValue;
1721
- }else if( markup.aAttr[vAttrIdx].iACode == ATTR_TYPE ){
1722
- vAttrDidAppend=1;
17231721
}
17241722
}
17251723
renderer.wantAutoParagraph = 0;
17261724
}
17271725
17281726
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1708,20 +1708,18 @@
1708 /* Enter <verbatim> processing. With verbatim enabled, all other
1709 ** markup other than the corresponding end-tag with the same ID is
1710 ** ignored.
1711 */
1712 if( markup.iCode==MARKUP_VERBATIM ){
1713 int vAttrIdx, vAttrDidAppend=0;
1714 renderer.zVerbatimId = 0;
1715 renderer.inVerbatim = 1;
1716 renderer.preVerbState = renderer.state;
1717 renderer.state &= ~ALLOW_WIKI;
1718 for (vAttrIdx = 0; vAttrIdx < markup.nAttr; vAttrIdx++){
1719 if( markup.aAttr[vAttrIdx].iACode == ATTR_ID ){
1720 renderer.zVerbatimId = markup.aAttr[0].zValue;
1721 }else if( markup.aAttr[vAttrIdx].iACode == ATTR_TYPE ){
1722 vAttrDidAppend=1;
1723 }
1724 }
1725 renderer.wantAutoParagraph = 0;
1726 }
1727
1728
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1708,20 +1708,18 @@
1708 /* Enter <verbatim> processing. With verbatim enabled, all other
1709 ** markup other than the corresponding end-tag with the same ID is
1710 ** ignored.
1711 */
1712 if( markup.iCode==MARKUP_VERBATIM ){
1713 int vAttrIdx;
1714 renderer.zVerbatimId = 0;
1715 renderer.inVerbatim = 1;
1716 renderer.preVerbState = renderer.state;
1717 renderer.state &= ~ALLOW_WIKI;
1718 for (vAttrIdx = 0; vAttrIdx < markup.nAttr; vAttrIdx++){
1719 if( markup.aAttr[vAttrIdx].iACode == ATTR_ID ){
1720 renderer.zVerbatimId = markup.aAttr[0].zValue;
 
 
1721 }
1722 }
1723 renderer.wantAutoParagraph = 0;
1724 }
1725
1726
+1 -4
--- src/xfer.c
+++ src/xfer.c
@@ -1198,20 +1198,19 @@
11981198
**
11991199
** gdb fossil
12001200
** r test-xfer out.txt
12011201
*/
12021202
void cmd_test_xfer(void){
1203
- int notUsed;
12041203
db_find_and_open_repository(0,0);
12051204
if( g.argc!=2 && g.argc!=3 ){
12061205
usage("?MESSAGEFILE?");
12071206
}
12081207
blob_zero(&g.cgiIn);
12091208
blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2]);
12101209
disableLogin = 1;
12111210
page_xfer();
1212
- fossil_print("%s\n", cgi_extract_content(&notUsed));
1211
+ fossil_print("%s\n", cgi_extract_content());
12131212
}
12141213
12151214
/*
12161215
** Format strings for progress reporting.
12171216
*/
@@ -1238,11 +1237,10 @@
12381237
int go = 1; /* Loop until zero */
12391238
int nCardSent = 0; /* Number of cards sent */
12401239
int nCardRcvd = 0; /* Number of cards received */
12411240
int nCycle = 0; /* Number of round trips to the server */
12421241
int size; /* Size of a config value */
1243
- int nFileSend = 0;
12441242
int origConfigRcvMask; /* Original value of configRcvMask */
12451243
int nFileRecv; /* Number of files received */
12461244
int mxPhantomReq = 200; /* Max number of phantoms to request per comm */
12471245
const char *zCookie; /* Server cookie */
12481246
i64 nSent, nRcvd; /* Bytes sent and received (after compression) */
@@ -1380,11 +1378,10 @@
13801378
zRandomness = db_text(0, "SELECT hex(randomblob(20))");
13811379
blob_appendf(&send, "# %s\n", zRandomness);
13821380
free(zRandomness);
13831381
13841382
/* Exchange messages with the server */
1385
- nFileSend = xfer.nFileSent + xfer.nDeltaSent;
13861383
fossil_print(zValueFormat, "Sent:",
13871384
blob_size(&send), nCardSent+xfer.nGimmeSent+xfer.nIGotSent,
13881385
xfer.nFileSent, xfer.nDeltaSent);
13891386
nCardSent = 0;
13901387
nCardRcvd = 0;
13911388
--- src/xfer.c
+++ src/xfer.c
@@ -1198,20 +1198,19 @@
1198 **
1199 ** gdb fossil
1200 ** r test-xfer out.txt
1201 */
1202 void cmd_test_xfer(void){
1203 int notUsed;
1204 db_find_and_open_repository(0,0);
1205 if( g.argc!=2 && g.argc!=3 ){
1206 usage("?MESSAGEFILE?");
1207 }
1208 blob_zero(&g.cgiIn);
1209 blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2]);
1210 disableLogin = 1;
1211 page_xfer();
1212 fossil_print("%s\n", cgi_extract_content(&notUsed));
1213 }
1214
1215 /*
1216 ** Format strings for progress reporting.
1217 */
@@ -1238,11 +1237,10 @@
1238 int go = 1; /* Loop until zero */
1239 int nCardSent = 0; /* Number of cards sent */
1240 int nCardRcvd = 0; /* Number of cards received */
1241 int nCycle = 0; /* Number of round trips to the server */
1242 int size; /* Size of a config value */
1243 int nFileSend = 0;
1244 int origConfigRcvMask; /* Original value of configRcvMask */
1245 int nFileRecv; /* Number of files received */
1246 int mxPhantomReq = 200; /* Max number of phantoms to request per comm */
1247 const char *zCookie; /* Server cookie */
1248 i64 nSent, nRcvd; /* Bytes sent and received (after compression) */
@@ -1380,11 +1378,10 @@
1380 zRandomness = db_text(0, "SELECT hex(randomblob(20))");
1381 blob_appendf(&send, "# %s\n", zRandomness);
1382 free(zRandomness);
1383
1384 /* Exchange messages with the server */
1385 nFileSend = xfer.nFileSent + xfer.nDeltaSent;
1386 fossil_print(zValueFormat, "Sent:",
1387 blob_size(&send), nCardSent+xfer.nGimmeSent+xfer.nIGotSent,
1388 xfer.nFileSent, xfer.nDeltaSent);
1389 nCardSent = 0;
1390 nCardRcvd = 0;
1391
--- src/xfer.c
+++ src/xfer.c
@@ -1198,20 +1198,19 @@
1198 **
1199 ** gdb fossil
1200 ** r test-xfer out.txt
1201 */
1202 void cmd_test_xfer(void){
 
1203 db_find_and_open_repository(0,0);
1204 if( g.argc!=2 && g.argc!=3 ){
1205 usage("?MESSAGEFILE?");
1206 }
1207 blob_zero(&g.cgiIn);
1208 blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2]);
1209 disableLogin = 1;
1210 page_xfer();
1211 fossil_print("%s\n", cgi_extract_content());
1212 }
1213
1214 /*
1215 ** Format strings for progress reporting.
1216 */
@@ -1238,11 +1237,10 @@
1237 int go = 1; /* Loop until zero */
1238 int nCardSent = 0; /* Number of cards sent */
1239 int nCardRcvd = 0; /* Number of cards received */
1240 int nCycle = 0; /* Number of round trips to the server */
1241 int size; /* Size of a config value */
 
1242 int origConfigRcvMask; /* Original value of configRcvMask */
1243 int nFileRecv; /* Number of files received */
1244 int mxPhantomReq = 200; /* Max number of phantoms to request per comm */
1245 const char *zCookie; /* Server cookie */
1246 i64 nSent, nRcvd; /* Bytes sent and received (after compression) */
@@ -1380,11 +1378,10 @@
1378 zRandomness = db_text(0, "SELECT hex(randomblob(20))");
1379 blob_appendf(&send, "# %s\n", zRandomness);
1380 free(zRandomness);
1381
1382 /* Exchange messages with the server */
 
1383 fossil_print(zValueFormat, "Sent:",
1384 blob_size(&send), nCardSent+xfer.nGimmeSent+xfer.nIGotSent,
1385 xfer.nFileSent, xfer.nDeltaSent);
1386 nCardSent = 0;
1387 nCardRcvd = 0;
1388

Keyboard Shortcuts

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