Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jan 2018 17:23:42 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458458 - head/games/iortcw/files
Message-ID:  <201801081723.w08HNguu099251@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Jan  8 17:23:41 2018
New Revision: 458458
URL: https://svnweb.freebsd.org/changeset/ports/458458

Log:
  games/iortcw: Fix build with clang 6.0
  
  code/splines/util_str.cpp:477:11: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          idStr e( reinterpret_cast<const char *>( NULL ) );
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  code/splines/util_str.cpp:491:10: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          a = c + reinterpret_cast<const char *>( NULL );
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  code/splines/util_str.cpp:494:6: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          a = reinterpret_cast<const char *>( NULL ) + d;
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  code/splines/util_str.cpp:498:7: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          a += reinterpret_cast<const char *>( NULL );
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  PR:		224988
  Reported by:	jbeich

Added:
  head/games/iortcw/files/patch-clang6   (contents, props changed)

Added: head/games/iortcw/files/patch-clang6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/iortcw/files/patch-clang6	Mon Jan  8 17:23:41 2018	(r458458)
@@ -0,0 +1,54 @@
+Comment unused TestStringClass() and fix build with Clang 6
+
+code/splines/util_str.cpp:477:11: error: reinterpret_cast from 'nullptr_t' to
+'const char *' is not allowed
+        idStr e( reinterpret_cast<const char *>( NULL ) );
+                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+code/splines/util_str.cpp:491:10: error: reinterpret_cast from 'nullptr_t' to
+'const char *' is not allowed
+        a = c + reinterpret_cast<const char *>( NULL );
+                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+code/splines/util_str.cpp:494:6: error: reinterpret_cast from 'nullptr_t' to
+'const char *' is not allowed
+        a = reinterpret_cast<const char *>( NULL ) + d;
+            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+code/splines/util_str.cpp:498:7: error: reinterpret_cast from 'nullptr_t' to
+'const char *' is not allowed
+        a += reinterpret_cast<const char *>( NULL );
+             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--- MP/code/splines/util_str.cpp.orig	2018-01-08 12:19:28 UTC
++++ MP/code/splines/util_str.cpp
+@@ -454,6 +454,7 @@ void idStr::snprintf
+ #pragma warning(disable : 4189) // local variable is initialized but not referenced
+ #endif
+ 
++#if 0
+ /*
+ =================
+ TestStringClass
+@@ -526,6 +527,7 @@ void TestStringClass
+ 
+ 	a[1] = '1';                 // a.data = "t1st", b.data = "test"
+ }
++#endif
+ 
+ #ifdef _MSC_VER
+ #pragma warning(default : 4189) // local variable is initialized but not referenced
+--- SP/code/splines/util_str.cpp.orig	2018-01-08 12:19:44 UTC
++++ SP/code/splines/util_str.cpp
+@@ -454,6 +454,7 @@ void idStr::snprintf
+ #pragma warning(disable : 4189) // local variable is initialized but not referenced
+ #endif
+ 
++#if 0
+ /*
+ =================
+ TestStringClass
+@@ -526,6 +527,7 @@ void TestStringClass
+ 
+ 	a[1] = '1';                 // a.data = "t1st", b.data = "test"
+ }
++#endif
+ 
+ #ifdef _MSC_VER
+ #pragma warning(default : 4189) // local variable is initialized but not referenced



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801081723.w08HNguu099251>