Fossil SCM

Fix a few harmless compiler warnings.

drh 2010-10-28 14:41 trunk
Commit d03718ad5fd9ba43368a5c66b5f5c9c7205e038e
2 files changed +2 -2 +2 -1
+2 -2
--- src/manifest.c
+++ src/manifest.c
@@ -314,11 +314,11 @@
314314
char cPrevType = 0;
315315
char cType;
316316
char *z;
317317
int n;
318318
char *zUuid;
319
- int sz;
319
+ int sz = 0;
320320
321321
/* Every control artifact ends with a '\n' character. Exit early
322322
** if that is not the case for this artifact.
323323
*/
324324
z = blob_buffer(pContent);
@@ -370,11 +370,11 @@
370370
** is omitted to delete an attachment. <target> is the name of
371371
** a wiki page or ticket to which that attachment is connected.
372372
*/
373373
case 'A': {
374374
char *zName, *zTarget, *zSrc;
375
- int nTarget, nSrc;
375
+ int nTarget = 0, nSrc = 0;
376376
zName = next_token(&x, 0);
377377
zTarget = next_token(&x, &nTarget);
378378
zSrc = next_token(&x, &nSrc);
379379
if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
380380
if( p->zAttachName!=0 ) goto manifest_syntax_error;
381381
--- src/manifest.c
+++ src/manifest.c
@@ -314,11 +314,11 @@
314 char cPrevType = 0;
315 char cType;
316 char *z;
317 int n;
318 char *zUuid;
319 int sz;
320
321 /* Every control artifact ends with a '\n' character. Exit early
322 ** if that is not the case for this artifact.
323 */
324 z = blob_buffer(pContent);
@@ -370,11 +370,11 @@
370 ** is omitted to delete an attachment. <target> is the name of
371 ** a wiki page or ticket to which that attachment is connected.
372 */
373 case 'A': {
374 char *zName, *zTarget, *zSrc;
375 int nTarget, nSrc;
376 zName = next_token(&x, 0);
377 zTarget = next_token(&x, &nTarget);
378 zSrc = next_token(&x, &nSrc);
379 if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
380 if( p->zAttachName!=0 ) goto manifest_syntax_error;
381
--- src/manifest.c
+++ src/manifest.c
@@ -314,11 +314,11 @@
314 char cPrevType = 0;
315 char cType;
316 char *z;
317 int n;
318 char *zUuid;
319 int sz = 0;
320
321 /* Every control artifact ends with a '\n' character. Exit early
322 ** if that is not the case for this artifact.
323 */
324 z = blob_buffer(pContent);
@@ -370,11 +370,11 @@
370 ** is omitted to delete an attachment. <target> is the name of
371 ** a wiki page or ticket to which that attachment is connected.
372 */
373 case 'A': {
374 char *zName, *zTarget, *zSrc;
375 int nTarget = 0, nSrc = 0;
376 zName = next_token(&x, 0);
377 zTarget = next_token(&x, &nTarget);
378 zSrc = next_token(&x, &nSrc);
379 if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
380 if( p->zAttachName!=0 ) goto manifest_syntax_error;
381
+2 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1150,11 +1150,12 @@
11501150
go = 0;
11511151
11521152
/* Process the reply that came back from the server */
11531153
while( blob_line(&recv, &xfer.line) ){
11541154
if( g.fHttpTrace ){
1155
- printf("\rGOT: %.*s", blob_size(&xfer.line), blob_buffer(&xfer.line));
1155
+ printf("\rGOT: %.*s", (int)blob_size(&xfer.line),
1156
+ blob_buffer(&xfer.line));
11561157
}
11571158
if( blob_buffer(&xfer.line)[0]=='#' ){
11581159
const char *zLine = blob_buffer(&xfer.line);
11591160
if( memcmp(zLine, "# timestamp ", 12)==0 ){
11601161
char zTime[20];
11611162
--- src/xfer.c
+++ src/xfer.c
@@ -1150,11 +1150,12 @@
1150 go = 0;
1151
1152 /* Process the reply that came back from the server */
1153 while( blob_line(&recv, &xfer.line) ){
1154 if( g.fHttpTrace ){
1155 printf("\rGOT: %.*s", blob_size(&xfer.line), blob_buffer(&xfer.line));
 
1156 }
1157 if( blob_buffer(&xfer.line)[0]=='#' ){
1158 const char *zLine = blob_buffer(&xfer.line);
1159 if( memcmp(zLine, "# timestamp ", 12)==0 ){
1160 char zTime[20];
1161
--- src/xfer.c
+++ src/xfer.c
@@ -1150,11 +1150,12 @@
1150 go = 0;
1151
1152 /* Process the reply that came back from the server */
1153 while( blob_line(&recv, &xfer.line) ){
1154 if( g.fHttpTrace ){
1155 printf("\rGOT: %.*s", (int)blob_size(&xfer.line),
1156 blob_buffer(&xfer.line));
1157 }
1158 if( blob_buffer(&xfer.line)[0]=='#' ){
1159 const char *zLine = blob_buffer(&xfer.line);
1160 if( memcmp(zLine, "# timestamp ", 12)==0 ){
1161 char zTime[20];
1162

Keyboard Shortcuts

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