[Issue 7822] New: lseek cast(int)offset should be lseek cast(off_t)offset
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 4 14:18:18 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7822
Summary: lseek cast(int)offset should be lseek
cast(off_t)offset
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: jayn at prismnet.com
--- Comment #0 from Jay Norwood <jayn at prismnet.com> 2012-04-04 14:18:53 PDT ---
cast(int)offset is found in lseek parameter in several places in the phobos
library code.
phobos\mmfile.d(137): lseek(fd, cast(int)(size - 1), SEEK_SET);
phobos\mmfile.d(362): .lseek(fd, cast(int)(size - 1),
SEEK_SET);
phobos\stream.d(1992): auto result = lseek(hFile, cast(int)offset, rel);
phobos\std\mmfile.d(130): lseek(fd, cast(int)(size - 1), SEEK_SET);
\phobos\std\stream.d(1987): auto result = lseek(hFile, cast(int)offset,
rel);
I'd guess these int casts are contrary to the intent of the use of off_t
redefinition to support 64 bit operations on linux and so the casts of the
offset parameter should be changed to cast(off_t) in each of these cases.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list