Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2018 19:12:35 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458677 - in head/audio/mac: . files
Message-ID:  <201801101912.w0AJCZui068342@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Jan 10 19:12:35 2018
New Revision: 458677
URL: https://svnweb.freebsd.org/changeset/ports/458677

Log:
  audio/mac: unbreak build with Clang 6 (C++14 by default)
  
  Console.cpp:36:3: error: cannot initialize a member subobject of type 'int' with an rvalue of type 'nullptr_t'
    NULL
    ^~~~
  /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
   #define NULL    nullptr
                   ^~~~~~~
  Console.cpp:36:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    NULL
    ^~~~
    {   }
  /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
   #define NULL    nullptr
                   ^~~~~~~
  Console.cpp:36:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    NULL
    ^~~~
    {   }
  /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
   #define NULL    nullptr
                   ^~~~~~~
  
  Reported by:	antoine (via bug 224669)

Added:
  head/audio/mac/files/patch-src_Console_Console.cpp   (contents, props changed)
Modified:
  head/audio/mac/Makefile   (contents, props changed)

Modified: head/audio/mac/Makefile
==============================================================================
--- head/audio/mac/Makefile	Wed Jan 10 19:02:56 2018	(r458676)
+++ head/audio/mac/Makefile	Wed Jan 10 19:12:35 2018	(r458677)
@@ -3,6 +3,7 @@
 
 PORTNAME=	mac
 PORTVERSION=	3.99.4.5.7
+PORTREVISION=	1
 CATEGORIES=	audio
 MASTER_SITES=	http://etree.org/shnutils/shntool/support/formats/ape/unix/3.99-u4-b5-s7/ \
 		http://freebsd.nsu.ru/distfiles/

Added: head/audio/mac/files/patch-src_Console_Console.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/mac/files/patch-src_Console_Console.cpp	Wed Jan 10 19:12:35 2018	(r458677)
@@ -0,0 +1,40 @@
+Console.cpp:36:3: error: cannot initialize a member subobject of type 'int' with an rvalue of type 'nullptr_t'
+  NULL
+  ^~~~
+/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
+#define NULL    nullptr
+                ^~~~~~~
+Console.cpp:36:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
+  NULL
+  ^~~~
+  {   }
+/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
+#define NULL    nullptr
+                ^~~~~~~
+Console.cpp:36:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
+  NULL
+  ^~~~
+  {   }
+/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
+#define NULL    nullptr
+                ^~~~~~~
+
+--- src/Console/Console.cpp.orig	2010-02-28 19:42:04 UTC
++++ src/Console/Console.cpp
+@@ -33,7 +33,6 @@ typedef struct
+ 
+ _ErrorDesc ErrorList[][2] = {
+   ERROR_EXPLANATION
+-  NULL
+ };
+ #endif
+ 
+@@ -91,7 +90,7 @@ char *ErrorToString(int nErrNo)
+ {
+     int i = 0;
+ 
+-    while (ErrorList[i])
++    while (i < sizeof(ErrorList)/sizeof(ErrorList[0]))
+     {
+         if (ErrorList[i]->nErrorNum == nErrNo)
+             return ErrorList[i]->sErrorString;



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