On Tue, Sep 22, 2009 at 01:35:42PM +0200, Ralf Mardorf wrote: >>> Unfortunately there's no Linux version available: >>> http://animata.kibu.hu/downloads.html >> The site is misleading, just checkout the svn and compile it. > > -Isrc/libs/tinyxml -Ibuild/libs/oscpack -Isrc/libs/oscpack > -I/usr/include/freetype2 src/Bone.cpp > In file included from src/animataUI.h:34, > from src/Bone.cpp:31: > src/libs/FLU/Flu_Tree_Browser.h: In member function 'unsigned int > Flu_Tree_Browser::Node::remove(const char*)': > src/libs/FLU/Flu_Tree_Browser.h:1081: error: cast from > 'Flu_Tree_Browser::Node*' to 'unsigned int' loses precision > scons: *** [build/Bone.o] Error 1 > scons: building terminated because of errors.
They use a Node pointer which is then casted to an "unsigned int". This works on i386 or wherever sizeof(void*) == sizeof(unsigned int), but fails everywhere else. Find attached a small patch correcting this issue. It's quick&dirty, I hadn't much time for it and I don't have any time left for testing. It builds, starts and outputs on both, amd64 and i386. I'll forward the patch to the animata guys for inclusion. HTH -- mail: a...@thur.de http://adi.thur.de PGP/GPG: key via keyserver Lieber zu dritt im Bett als alleine im Sarg!
Index: src/libs/FLU/Flu_Tree_Browser.cpp =================================================================== --- src/libs/FLU/Flu_Tree_Browser.cpp (revision 49) +++ src/libs/FLU/Flu_Tree_Browser.cpp (working copy) @@ -2981,12 +2981,12 @@ return add( path, p.c_str(), w, showLabel ); } -unsigned int Flu_Tree_Browser :: remove( const char *fullpath ) +uintptr_t Flu_Tree_Browser :: remove( const char *fullpath ) { - return( (unsigned int)root.modify( fullpath, Node::REMOVE, rdata ) ); + return( (uintptr_t) root.modify( fullpath, Node::REMOVE, rdata ) ); } -unsigned int Flu_Tree_Browser :: remove( const char *path, const char *text ) +uintptr_t Flu_Tree_Browser :: remove( const char *path, const char *text ) { // if the path does not end in '/', add it FluSimpleString s = path; @@ -2996,12 +2996,12 @@ return remove( s.c_str() ); } -unsigned int Flu_Tree_Browser :: remove( unsigned int id ) +uintptr_t Flu_Tree_Browser :: remove( unsigned int id ) { return root.remove( id ); } -unsigned int Flu_Tree_Browser :: Node :: remove( unsigned int id ) +uintptr_t Flu_Tree_Browser :: Node :: remove( unsigned int id ) { if( id == 0 ) return 0; @@ -3028,12 +3028,12 @@ return 0; } -unsigned int Flu_Tree_Browser :: remove( Fl_Widget *w ) +uintptr_t Flu_Tree_Browser :: remove( Fl_Widget *w ) { return root.remove( w ); } -unsigned int Flu_Tree_Browser :: Node :: remove( Fl_Widget *w ) +uintptr_t Flu_Tree_Browser :: Node :: remove( Fl_Widget *w ) { if( !w ) return 0; Index: src/libs/FLU/Flu_Tree_Browser.h =================================================================== --- src/libs/FLU/Flu_Tree_Browser.h (revision 49) +++ src/libs/FLU/Flu_Tree_Browser.h (working copy) @@ -19,6 +19,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <stdint.h> //#define USE_FLU_DND @@ -436,23 +437,23 @@ //! Remove the entry identified by path \b fullpath from the tree /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - unsigned int remove( const char *fullpath ); + uintptr_t remove( const char *fullpath ); //! Remove entry \b name in path \b path from the tree /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - unsigned int remove( const char *path, const char *name ); + uintptr_t remove( const char *path, const char *name ); //! Remove the entry identified by unique id \b id from the tree /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - unsigned int remove( unsigned int id ); + uintptr_t remove( unsigned int id ); //! Remove the entry containing the widget \b w from the tree. Note that the widget is automatically destroyed /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - unsigned int remove( Fl_Widget *w ); + uintptr_t remove( Fl_Widget *w ); //! Remove Node \b n from the tree /*! \return the id of \b n on successful removal, or \c 0 if \b n is not in the tree */ - inline unsigned int remove( Node* n ) + inline uintptr_t remove( Node* n ) { if( !n ) return 0; else return remove( n->id() ); } //! Override of Fl_Widget::resize @@ -1077,20 +1078,20 @@ //! Remove the entry identified by path \b fullpath from this node /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - inline unsigned int remove( const char *fullpath ) - { return( (unsigned int)modify( fullpath, REMOVE, tree->rdata ) ); } + inline uintptr_t remove( const char *fullpath ) + { return( (uintptr_t) modify( fullpath, REMOVE, tree->rdata ) ); } //! Remove the entry identified by unique id \b id from this node /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - unsigned int remove( unsigned int id ); + uintptr_t remove( unsigned int id ); //! Remove the node containing the widget \b w from this node. Note that the widget is automatically destroyed /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ - unsigned int remove( Fl_Widget *w ); + uintptr_t remove( Fl_Widget *w ); //! Remove Node \b n /*! \return the id of \b n on successful removal, or \c 0 if \b n is present */ - inline unsigned int remove( Node* n ) + inline uintptr_t remove( Node* n ) { if( !n ) return 0; else return remove( n->id() ); } //! Select this entry and all child entries
_______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev