diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-01-11 03:12:35 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-01-11 03:12:35 +0800 |
commit | 4a94ba3f626da0f8613eb86c6a7ae97fc102285a (patch) | |
tree | a3bb1f8c6b47a1bb25a59ba6cec3a841b2da6eba /audio | |
parent | ec2ae66b63ce0e66624c44226fa4b8e685961713 (diff) | |
download | freebsd-ports-gnome-4a94ba3f626da0f8613eb86c6a7ae97fc102285a.tar.gz freebsd-ports-gnome-4a94ba3f626da0f8613eb86c6a7ae97fc102285a.tar.zst freebsd-ports-gnome-4a94ba3f626da0f8613eb86c6a7ae97fc102285a.zip |
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)
Diffstat (limited to 'audio')
-rw-r--r-- | audio/mac/Makefile | 1 | ||||
-rw-r--r-- | audio/mac/files/patch-src_Console_Console.cpp | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/audio/mac/Makefile b/audio/mac/Makefile index 117e11625ab3..12cf6d24beeb 100644 --- a/audio/mac/Makefile +++ b/audio/mac/Makefile @@ -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/ diff --git a/audio/mac/files/patch-src_Console_Console.cpp b/audio/mac/files/patch-src_Console_Console.cpp new file mode 100644 index 000000000000..75612d228cc4 --- /dev/null +++ b/audio/mac/files/patch-src_Console_Console.cpp @@ -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; |