Fossil SCM

Fix a warning (a real one) on win32: Win32 printf doesn't know about "%lld".

jan.nijtmans 2019-05-17 14:04 trunk
Commit f6524ae5cc3f6d8da94c10cec37031836c3ef73c77262bcc28335c0646c84e5d
1 file changed +5 -2
+5 -2
--- src/export.c
+++ src/export.c
@@ -1061,10 +1061,11 @@
10611061
char *zMark; /* The Git-name of the check-in */
10621062
Blob sql; /* String of SQL for part of the query */
10631063
Blob comment; /* The comment text for the check-in */
10641064
int nErr = 0; /* Number of errors */
10651065
int bPhantomOk; /* True if phantom files should be ignored */
1066
+ char buf[24];
10661067
10671068
pMan = manifest_get(rid, CFTYPE_MANIFEST, 0);
10681069
if( pMan==0 ){
10691070
/* Must be a phantom. Return without doing anything, and in particular
10701071
** without creating a mark for this check-in. */
@@ -1134,13 +1135,15 @@
11341135
fprintf(xCmd, "commit refs/heads/%s\n", zBranch);
11351136
fossil_free(zBranch);
11361137
zMark = gitmirror_find_mark(zUuid,0,1);
11371138
fprintf(xCmd, "mark %s\n", zMark);
11381139
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",
11411141
(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
11421145
);
11431146
blob_init(&comment, pMan->zComment, -1);
11441147
if( blob_size(&comment)==0 ){
11451148
blob_append(&comment, "(no comment)", -1);
11461149
}
11471150
--- 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

Keyboard Shortcuts

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