Bug 167552

Summary: graphics/osg: /usr/ports/graphics/osg/work/OpenSceneGraph-3.0.1/include/OpenThreads/Atomic:244:48: error: cannot initialize a parameter of type 'void *' with an lvalue of type 'const void *const' return __sync_bool_compare_and_swap(&
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description O. Hartmann 2012-05-03 07:40:05 UTC
 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enig51C9A372D46EBABF8B552164
 Content-Type: multipart/mixed;
  boundary="------------010609050409080907000705"
 
 This is a multi-part message in MIME format.
 --------------010609050409080907000705
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 On FreeBSD 10.0-CURRENT/amd64, compiling with gcc46 and gcc47 as well as
 with legacy gcc4.2.1. I don't know why this does not work on FreeBSD
 9.0-STABLE.
 
 I found a solution for CLANG, following the URL provided below. The
 solution sounds reasonable. Attached, you'll find a patchfile.
 
 URL:
 
 http://forum.openscenegraph.org/viewtopic.php?t=3D10121
 
 --------------010609050409080907000705
 Content-Type: text/plain; charset=us-ascii;
  name="patch-include-OpenThreads-Atomic"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
  filename="patch-include-OpenThreads-Atomic"
 
 --- include/OpenThreads/Atomic.orig	2012-05-03 08:12:27.000000000 +0200
 +++ include/OpenThreads/Atomic	2012-05-03 08:13:02.000000000 +0200
 @@ -241,7 +241,7 @@
  AtomicPtr::assign(void* ptrNew, const void* const ptrOld)
  {
  #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
 -    return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew);
 +    return __sync_bool_compare_and_swap(&_ptr, (void*)ptrOld, ptrNew);
  #elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
      return __compare_and_swap((unsigned long*)&_ptr, (unsigned long)ptrO=
 ld, (unsigned long)ptrNew);
  #elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
 
 --------------010609050409080907000705--
 
 --------------enig51C9A372D46EBABF8B552164
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (FreeBSD)
 
 iQEcBAEBAgAGBQJPoidVAAoJEOgBcD7A/5N8ZnMIAJ5QDtwJ0a99f1jdLNapXZ17
 e0F1h9ZpvNWAgy7Z7nkHkaPYJWLlvaZzFgLw8OujAwqveMGgwtwW2y/ervZGG96L
 +5yWEFvWSPIdHlJCniUZyVD5QqwCn8FmlIXEGB1fYyiz4GVvgIP72uqmoQ5G1GYB
 U170eqQKRNuRSLaoBhxJchAbIsQOU6VcWFV3LlSG7wski2tUgacWqrvEknsb9Tll
 hd6nAu38CwZWmrJQBnNVyIVcatMyiR6tSwpj2c+mzzIiwlrTqSyKW/K8cJ3W4A4n
 j+tlTaLdJu41Ij8h08aBtb3rE7GrXMKkZxnJ7FRAGQktG97K13vrN2cr7IqIPLk=
 =tZuV
 -----END PGP SIGNATURE-----
 
 --------------enig51C9A372D46EBABF8B552164--
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-05-03 08:32:13 UTC
State Changed
From-To: open->closed

Misfiled followup to ports/167550; content migrated. 


Comment 2 Mark Linimon freebsd_committer freebsd_triage 2012-05-03 08:32:13 UTC
Responsible Changed
From-To: gnats-admin->amdmi3