Fossil SCM

Cast strlen() to int when used as a printf() argument.

drh 2010-11-11 01:16 trunk
Commit 5fa4dfc28693c02ac0bd301bb18fd6a8e0b24c55
1 file changed +1 -1
+1 -1
--- src/export.c
+++ src/export.c
@@ -152,11 +152,11 @@
152152
free(zBr);
153153
printf("committer");
154154
print_person(zUser);
155155
printf(" %lld +0000\n", secondsSince1970);
156156
if( zComment==0 ) zComment = "null comment";
157
- printf("data %d\n%s\n", strlen(zComment), zComment);
157
+ printf("data %d\n%s\n", (int)strlen(zComment), zComment);
158158
p = manifest_get(ckinId, CFTYPE_ANY);
159159
zFromType = "from";
160160
for(i=0; i<p->nParent; i++){
161161
int pid = fast_uuid_to_rid(p->azParent[i]);
162162
if( pid==0 || !bag_find(&vers, pid) ) continue;
163163
--- src/export.c
+++ src/export.c
@@ -152,11 +152,11 @@
152 free(zBr);
153 printf("committer");
154 print_person(zUser);
155 printf(" %lld +0000\n", secondsSince1970);
156 if( zComment==0 ) zComment = "null comment";
157 printf("data %d\n%s\n", strlen(zComment), zComment);
158 p = manifest_get(ckinId, CFTYPE_ANY);
159 zFromType = "from";
160 for(i=0; i<p->nParent; i++){
161 int pid = fast_uuid_to_rid(p->azParent[i]);
162 if( pid==0 || !bag_find(&vers, pid) ) continue;
163
--- src/export.c
+++ src/export.c
@@ -152,11 +152,11 @@
152 free(zBr);
153 printf("committer");
154 print_person(zUser);
155 printf(" %lld +0000\n", secondsSince1970);
156 if( zComment==0 ) zComment = "null comment";
157 printf("data %d\n%s\n", (int)strlen(zComment), zComment);
158 p = manifest_get(ckinId, CFTYPE_ANY);
159 zFromType = "from";
160 for(i=0; i<p->nParent; i++){
161 int pid = fast_uuid_to_rid(p->azParent[i]);
162 if( pid==0 || !bag_find(&vers, pid) ) continue;
163

Keyboard Shortcuts

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