[openbeos] Re: Build error: bfs.h error: cast from ‘const small_data*’ to ‘fssh_addr_t’ loses precision

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 08 Apr 2008 11:30:35 +0200

On 2008-04-08 at 03:03:01 [+0200], Raymond Rodgers <obos@xxxxxxxxxxxx> wrote:
> Ingo Weinhold wrote:
> > On 2008-04-07 at 23:33:43 [+0200], Raymond Rodgers <obos@xxxxxxxxxxxx>
> > wrote:
> >   
> >> I've been getting a build error under Linux (Fedora 8 x86_64 regardless
> >> of whether in normal or "linux32" mode) for the last couple of weeks:
> >>
> >> src/add-ons/kernel/file_systems/bfs/bfs.h: In member function ‘bool
> >> small_data::IsLast(const bfs_inode*) const’:
> >> src/add-ons/kernel/file_systems/bfs/bfs.h:375: error: cast from ‘const
> >> small_data*’ to ‘fssh_addr_t’ loses precision
> >> src/add-ons/kernel/file_systems/bfs/bfs.h:375: error: cast from ‘const
> >> bfs_inode*’ to ‘fssh_addr_t’ loses precision
> >
> > Looks like you're still in 64 bit mode. Otherwise a cast from a pointer to
> > a 32 bit integer shouldn't lose any precision.
> >
> >   
> Thanks for responding Ingo, but it doesn't appear that's the problem
> unless linux32 is broken on my machine. After I got your message, I
> removed the "generated" directory, and rebuilt the build tools while in
> linux32 mode, and I still got the same error. Thinking that perhaps my
> sources were corrupt afterwards, I completely removed my source
> directories, and fetched them again via svn, rebuilt the build tools,
> and tried again with the same results. (Again in linux32 mode.)
> 
> So either my linux32 executable doesn't currently work, or perhaps
> there's something else about my system that the build process doesn't
> like at the moment.

I don't use a 64 bit Linux and therefore don't know the linux32 command 
either. If it is supposed to change your build environment to 32 bit and 
you've used it correctly, then it is obviously broken, as the above error 
shouldn't occur with a 32 bit compiler.

CU, Ingo

Other related posts: