Fossil SCM
Fix warning when compiling with gcc on Windows (Microsoft's fprintf does't know %lld)
Commit
68288686e06b1b3e95066a875e8d2dcc0ec8c182
Parent
6f3ec1bef6bdad6…
1 file changed
+4
-2
+4
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1382,12 +1382,14 @@ | ||
| 1382 | 1382 | */ |
| 1383 | 1383 | zCleanRepo = file_cleanup_fullpath(zRepo); |
| 1384 | 1384 | if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){ |
| 1385 | 1385 | szFile = file_size(zCleanRepo); |
| 1386 | 1386 | 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); | |
| 1389 | 1391 | } |
| 1390 | 1392 | } |
| 1391 | 1393 | |
| 1392 | 1394 | /* If no file named by zRepo exists, remove the added ".fossil" suffix |
| 1393 | 1395 | ** and check to see if there is a file or directory with the same |
| 1394 | 1396 |
| --- 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 |