Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/audio/record
On Thu, Sep 22, 2011 at 09:28:56PM +0200, Marc Balmer wrote:
>
> Am 22.09.2011 um 19:34 schrieb Christos Zoulas:
>
> > In article <DBE1242C-F99E-4B75-B356-516245ACA3CF%msys.ch@localhost>,
> > Marc Balmer <marc%msys.ch@localhost> wrote:
> >>> if (outfd == STDOUT_FILENO)
> >>> return;
> >>>
> >>> - if (lseek(outfd, SEEK_SET, 0) < 0)
> >>> + if (lseek(outfd, (off_t)0, SEEK_SET) == (off_t)-1)
> >>> err(1, "could not seek to start of file for header rewrite");
> >>
> >> Fwiw, this never caused a problem since SEEK_SET is defined 0. But why
> >> is an explicit typecast to off_t needed? Aren't integer cast
> >> automatically?
> >
> > It is belt-and-suspenders if the prototype is not in scope.
> >
>
> In this case, wouldn't it do the right thing even without a
> prototype in scope?
Depends on the architecture.
> Would it even compile without a prototype in scope?
Depends on the compilation options.
Personally I'd compile with the missing prototype being a compile error,
and remove the cast.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index