Fossil SCM

Fix warning when compiling with gcc on Windows (Microsoft's fprintf does't know %lld)

jan.nijtmans 2016-12-08 10:25 UTC trunk
Commit 68288686e06b1b3e95066a875e8d2dcc0ec8c182
1 file changed +4 -2
+4 -2
--- src/main.c
+++ src/main.c
@@ -1382,12 +1382,14 @@
13821382
*/
13831383
zCleanRepo = file_cleanup_fullpath(zRepo);
13841384
if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){
13851385
szFile = file_size(zCleanRepo);
13861386
if( g.fHttpTrace ){
1387
- @ <!-- file_size(%h(zCleanRepo)) is %lld(szFile) -->
1388
- fprintf(stderr, "# file_size(%s) = %lld\n", zCleanRepo, szFile);
1387
+ char zBuf[24];
1388
+ sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", szFile);
1389
+ @ <!-- file_size(%h(zCleanRepo)) is %s(zBuf) -->
1390
+ fprintf(stderr, "# file_size(%s) = %s\n", zCleanRepo, zBuf);
13891391
}
13901392
}
13911393
13921394
/* If no file named by zRepo exists, remove the added ".fossil" suffix
13931395
** and check to see if there is a file or directory with the same
13941396
--- src/main.c
+++ src/main.c
@@ -1382,12 +1382,14 @@
1382 */
1383 zCleanRepo = file_cleanup_fullpath(zRepo);
1384 if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){
1385 szFile = file_size(zCleanRepo);
1386 if( g.fHttpTrace ){
1387 @ <!-- file_size(%h(zCleanRepo)) is %lld(szFile) -->
1388 fprintf(stderr, "# file_size(%s) = %lld\n", zCleanRepo, szFile);
 
 
1389 }
1390 }
1391
1392 /* If no file named by zRepo exists, remove the added ".fossil" suffix
1393 ** and check to see if there is a file or directory with the same
1394
--- src/main.c
+++ src/main.c
@@ -1382,12 +1382,14 @@
1382 */
1383 zCleanRepo = file_cleanup_fullpath(zRepo);
1384 if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){
1385 szFile = file_size(zCleanRepo);
1386 if( g.fHttpTrace ){
1387 char zBuf[24];
1388 sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", szFile);
1389 @ <!-- file_size(%h(zCleanRepo)) is %s(zBuf) -->
1390 fprintf(stderr, "# file_size(%s) = %s\n", zCleanRepo, zBuf);
1391 }
1392 }
1393
1394 /* If no file named by zRepo exists, remove the added ".fossil" suffix
1395 ** and check to see if there is a file or directory with the same
1396

Keyboard Shortcuts

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