The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help - Cast converts default int return type rtgreen High Level Programming 5 04-24-2007 10:15 AM
to get the correct value with unsigned int naan High Level Programming 2 04-11-2007 03:29 AM
Reference to a const arun.viswanath High Level Programming 1 09-05-2005 03:20 AM
why to use dynamic cast in c++ sarwan High Level Programming 0 09-01-2005 02:40 AM
Unsigned int nimnod High Level Programming 2 03-03-2002 11:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-07-2008
Registered User
 

Join Date: Apr 2008
Posts: 24
cast from const void* to unsigned int loses precision

Hello everey one,

here i am attempting to compile a c++ project .it's throughing the following errors.

my machine details are as follows:

Linux chmclozr0119 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

errors:
=====
Generating /root/cc/unix-ce/root/subsys/cb/cdbg/obj_sched_csvON/Linux//cdbg_CDBSP_cdbRS.o from cdbg_CDBSP_cdbRS.C
/usr/bin/c++ -c -g -DDEBUG -DMAT -I/root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/ -I/root/cc/unix-ce/root/subsys/cb/cdbg/src -I/root/cc/unix-ce/root/subsys/cb/cdbg/obj_sched_csvON/Linux/ -I/root/cc/unix-ce/root/subsys/lib/Linux -I/root/cc/unix-ce/root/subsys/cb/cdbg/include -I/root/cc/unix-ce/root/subsys/include -I/opt/dce/include -I/opt/dce/include/dce -DUSE_FREE_DCE -I/root/cc/unix-ce/root/3pp/include/Linux -I/usr/include/X11 -I/usr/X11R6/include -D_GNU_SOURCE -DLINUX -DUSE_SHADOW -DUCE_SSH -DIDL_CHAR_IS_CHAR -D_REENTRANT -fsigned-char -DCXX_VERSION=4.1.2 -DRW_MULTI_THREAD -DSNACC_DEEP_COPY -DSWP_CDBG_sched_csvON -o /root/cc/unix-ce/root/subsys/cb/cdbg/obj_sched_csvON/Linux//cdbg_CDBSP_cdbRS.o cdbg_CDBSP_cdbRS.C
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
from cdbg_CDBSP_cdbRS.C:30:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
ERROR 1) /root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/rw/defs.h:542: error: using typedef-name âstd::istreamâ after âclassâ
ERROR 2)/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:137: error: âstd::istreamâ has a previous declaration here
ERROR 3)/root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/rw/defs.h:543: error: using typedef-name âstd:streamâ after âclassâ
ERROR4)/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:138: error: âstd:streamâ has a previous declaration here
ERROR5)/root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/rw/defs.h:544: error: using typedef-name âstd::iosâ after âclassâ
ERROR 6)/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:135: error: âstd::iosâ has a previous declaration here
/root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/rw/tooldefs.h: In function âunsigned int RWhashAddress(const void*)â:
ERROR7)/root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/rw/tooldefs.h:424: error: cast from âconst void*â to âunsigned intâ loses precision
ERROR8)/root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/rw/tooldefs.h:424: error: cast from âconst void*â to âunsigned intâ loses precision
cdbg_CDBSP_cdbRS.C: In function âvoid cdbg_f1_init_scheduler(int, char**, unsigned32*)â:
ERROR9)cdbg_CDBSP_cdbRS.C:61: error: invalid conversion from âintâ to âstd::_Ios_Openmodeâ
ERROR10)cdbg_CDBSP_cdbRS.C:61: error: initializing argument 3 of âstd::strstream::strstream(char*, int, std::_Ios_Openmode)â
*** Error code 1
clearmake: Error: Build script failed for "/root/cc/unix-ce/root/subsys/cb/cdbg/obj_sched_csvON/Linux//cdbg_CDBSP_cdbRS.o"
========================================================

clearmake[1]: Leaving directory `/root/cc/unix-ce/root/subsys/cb/cdbg/src'
*** Error code 1
clearmake: Error: Build script failed for "compile"


error 1 has the following code:

class _RWCLASSTYPE istream;

error 2 has the follwing code :
typedef basic_istream<char> istream; ///< @isiosfwd

error 3 has the following code
class _RWCLASSTYPE ostream;

error 4 has the following code:
typedef basic_ostream<char> ostream; ///< @isiosfwd
error 5 has the following code:
class _RWCLASSTYPE ios;
error 6 has the following code:
typedef basic_ios<char> ios; ///< @isiosfwd

error 7&8 has the following code:

inline unsigned RWhashAddress(const void* a)
{
// For other addresses, mix in some higher order bits
// into the lower order bits:
return ((unsigned)a ^ ((unsigned)a>>3));
}
error 9 has the following code:
strstream tmpStrStream((char *) iString.data(),leni,(int)ios::ate);

error 10 has the following code:

unsigned long i = 0;
RWCString iString(i2_argv[1]);
size_t len = iString.length();
int leni = (int) len;
strstream tmpStrStream((char *) iString.data(),leni,(int)ios::ate);
tmpStrStream >> i;
g_cdb_key = i;




CAN SOMEBODY HELP ME TO SOLVE THESE ERRORS.

kind regards,
Srinivas.Mannam
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0