Skip to content

Commit 05f5777

Browse files
authored
Restore %td format specifiers (#6992)
DTPRINT is Rprintf, so goes through R's built-in copy of 'trio', so C99 specifiers are fine to use here. On the other hand, 'long' is only 32 bits in size even on 64-bit Windows and so is unsafe to use for sizes.
1 parent f032d66 commit 05f5777

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,8 +1929,8 @@ int freadMain(freadMainArgs _args) {
19291929
} else if (jump0size==0) {
19301930
DTPRINT(_(" Number of sampling jump points = %d because jump0size==0\n"), nJumps);
19311931
} else {
1932-
DTPRINT(_(" Number of sampling jump points = %d because (%ld bytes from row 1 to eof) / (2 * %ld jump0size) == %ld\n"),
1933-
nJumps, (long int)sz, (long int)jump0size, (long int)(sz/(2*jump0size)));
1932+
DTPRINT(_(" Number of sampling jump points = %d because (%td bytes from row 1 to eof) / (2 * %td jump0size) == %td\n"),
1933+
nJumps, sz, jump0size, sz/(2*jump0size));
19341934
}
19351935
}
19361936
nJumps++; // the extra sample at the very end (up to eof) is sampled and format checked but not jumped to when reading

0 commit comments

Comments
 (0)