Fossil SCM
Fix a warning (a real one) on win32: Win32 printf doesn't know about "%lld".
Commit
f6524ae5cc3f6d8da94c10cec37031836c3ef73c77262bcc28335c0646c84e5d
Parent
5e9c1d5e049b095…
1 file changed
+5
-2
+5
-2
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -1061,10 +1061,11 @@ | ||
| 1061 | 1061 | char *zMark; /* The Git-name of the check-in */ |
| 1062 | 1062 | Blob sql; /* String of SQL for part of the query */ |
| 1063 | 1063 | Blob comment; /* The comment text for the check-in */ |
| 1064 | 1064 | int nErr = 0; /* Number of errors */ |
| 1065 | 1065 | int bPhantomOk; /* True if phantom files should be ignored */ |
| 1066 | + char buf[24]; | |
| 1066 | 1067 | |
| 1067 | 1068 | pMan = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1068 | 1069 | if( pMan==0 ){ |
| 1069 | 1070 | /* Must be a phantom. Return without doing anything, and in particular |
| 1070 | 1071 | ** without creating a mark for this check-in. */ |
| @@ -1134,13 +1135,15 @@ | ||
| 1134 | 1135 | fprintf(xCmd, "commit refs/heads/%s\n", zBranch); |
| 1135 | 1136 | fossil_free(zBranch); |
| 1136 | 1137 | zMark = gitmirror_find_mark(zUuid,0,1); |
| 1137 | 1138 | fprintf(xCmd, "mark %s\n", zMark); |
| 1138 | 1139 | fossil_free(zMark); |
| 1139 | - fprintf(xCmd, "committer %s <%[email protected]> %lld +0000\n", | |
| 1140 | - pMan->zUser, pMan->zUser, | |
| 1140 | + sqlite3_snprintf(sizeof(buf), buf, "%lld", | |
| 1141 | 1141 | (sqlite3_int64)((pMan->rDate-2440587.5)*86400.0) |
| 1142 | + ); | |
| 1143 | + fprintf(xCmd, "committer %s <%[email protected]> %s +0000\n", | |
| 1144 | + pMan->zUser, pMan->zUser, buf | |
| 1142 | 1145 | ); |
| 1143 | 1146 | blob_init(&comment, pMan->zComment, -1); |
| 1144 | 1147 | if( blob_size(&comment)==0 ){ |
| 1145 | 1148 | blob_append(&comment, "(no comment)", -1); |
| 1146 | 1149 | } |
| 1147 | 1150 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1061,10 +1061,11 @@ | |
| 1061 | char *zMark; /* The Git-name of the check-in */ |
| 1062 | Blob sql; /* String of SQL for part of the query */ |
| 1063 | Blob comment; /* The comment text for the check-in */ |
| 1064 | int nErr = 0; /* Number of errors */ |
| 1065 | int bPhantomOk; /* True if phantom files should be ignored */ |
| 1066 | |
| 1067 | pMan = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1068 | if( pMan==0 ){ |
| 1069 | /* Must be a phantom. Return without doing anything, and in particular |
| 1070 | ** without creating a mark for this check-in. */ |
| @@ -1134,13 +1135,15 @@ | |
| 1134 | fprintf(xCmd, "commit refs/heads/%s\n", zBranch); |
| 1135 | fossil_free(zBranch); |
| 1136 | zMark = gitmirror_find_mark(zUuid,0,1); |
| 1137 | fprintf(xCmd, "mark %s\n", zMark); |
| 1138 | fossil_free(zMark); |
| 1139 | fprintf(xCmd, "committer %s <%[email protected]> %lld +0000\n", |
| 1140 | pMan->zUser, pMan->zUser, |
| 1141 | (sqlite3_int64)((pMan->rDate-2440587.5)*86400.0) |
| 1142 | ); |
| 1143 | blob_init(&comment, pMan->zComment, -1); |
| 1144 | if( blob_size(&comment)==0 ){ |
| 1145 | blob_append(&comment, "(no comment)", -1); |
| 1146 | } |
| 1147 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1061,10 +1061,11 @@ | |
| 1061 | char *zMark; /* The Git-name of the check-in */ |
| 1062 | Blob sql; /* String of SQL for part of the query */ |
| 1063 | Blob comment; /* The comment text for the check-in */ |
| 1064 | int nErr = 0; /* Number of errors */ |
| 1065 | int bPhantomOk; /* True if phantom files should be ignored */ |
| 1066 | char buf[24]; |
| 1067 | |
| 1068 | pMan = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1069 | if( pMan==0 ){ |
| 1070 | /* Must be a phantom. Return without doing anything, and in particular |
| 1071 | ** without creating a mark for this check-in. */ |
| @@ -1134,13 +1135,15 @@ | |
| 1135 | fprintf(xCmd, "commit refs/heads/%s\n", zBranch); |
| 1136 | fossil_free(zBranch); |
| 1137 | zMark = gitmirror_find_mark(zUuid,0,1); |
| 1138 | fprintf(xCmd, "mark %s\n", zMark); |
| 1139 | fossil_free(zMark); |
| 1140 | sqlite3_snprintf(sizeof(buf), buf, "%lld", |
| 1141 | (sqlite3_int64)((pMan->rDate-2440587.5)*86400.0) |
| 1142 | ); |
| 1143 | fprintf(xCmd, "committer %s <%[email protected]> %s +0000\n", |
| 1144 | pMan->zUser, pMan->zUser, buf |
| 1145 | ); |
| 1146 | blob_init(&comment, pMan->zComment, -1); |
| 1147 | if( blob_size(&comment)==0 ){ |
| 1148 | blob_append(&comment, "(no comment)", -1); |
| 1149 | } |
| 1150 |