Package: libcwd
Version: 0.99.40-2
Severity: normal
Tags: patch

When building 'libcwd' on amd64/unstable with gcc-4.0,
I get the following error:

 x86_64-linux-g++ -DHAVE_CONFIG_H -I./include -I./include -include pch.h 
-DCWDEBUG -O2 -pipe -fno-exceptions -g -O2 -pipe -fno-exceptions -c elf32.cc  
-fPIC -DPIC -o .libs/libcwd_la-elf32.o
elf32.cc: In function 'libcwd::elf32::block_t libcwd::elf32::read_block(const 
unsigned char*&, libcwd::elf32::uLEB128_t)':
elf32.cc:876: error: cast from 'const unsigned char*' to 
'libcwd::elf32::Elf32_Addr' loses precision
make[3]: *** [libcwd_la-elf32.lo] Error 1
make[3]: Leaving directory `/libcwd-0.99.40'

With the attached patch 'libcwd' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/libcwd-0.99.40/elf32.cc ./elf32.cc
--- ../tmp-orig/libcwd-0.99.40/elf32.cc 2004-10-07 19:53:59.000000000 +0200
+++ ./elf32.cc  2005-06-20 19:25:31.000000000 +0200
@@ -873,7 +873,7 @@
   LIBCWD_ASSERT(form == DW_FORM_block1 || form == DW_FORM_block2 || form == 
DW_FORM_block4 || form == DW_FORM_block);
 #endif
   block_t result;
-  result.begin = (Elf32_Addr)debug_info_ptr;
+  result.begin = (long)debug_info_ptr;
   switch(form)
   {
     case DW_FORM_block1:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to