Date: Sat, 6 Jan 2018 04:13:11 +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: r458191 - head/textproc/exempi/files Message-ID: <201801060413.w064DBWa067513@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Sat Jan 6 04:13:11 2018 New Revision: 458191 URL: https://svnweb.freebsd.org/changeset/ports/458191 Log: textproc/exempi: unbreak build with Clang 6 (C++14 by default) In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:703:81: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetLocalizedText( kXMP_NS_DC, "title", "", "x-default", 0, &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:1232:28: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:710:57: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetProperty( kXMP_NS_DM, "artist", &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:717:56: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetProperty( kXMP_NS_DM, "album", &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:724:62: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetProperty( kXMP_NS_XMP, "CreateDate", &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:736:61: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetProperty( kXMP_NS_DM, "logComment", &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:743:56: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetProperty( kXMP_NS_DM, "genre", &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ In file included from MP3_Handler.cpp:11: In file included from ./MP3_Handler.hpp:15: ./../FormatSupport/ID3_Support.hpp:763:62: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( meta->GetProperty( kXMP_NS_DM, "trackNumber", &utf8, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:607:79: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') ...( xmp->GetProperty( bextCodingHistory.ns, bextCodingHistory.prop, &value, kXMP_NoOptions )) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:619:75: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( xmp->GetProperty( bextDescription.ns, bextDescription.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:626:74: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( xmp->GetProperty( bextOriginator.ns , bextOriginator.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:633:80: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') ...( xmp->GetProperty( bextOriginatorRef.ns , bextOriginatorRef.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:640:84: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') ...bextOriginationDate.ns , bextOriginationDate.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:647:84: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') ...bextOriginationTime.ns , bextOriginationTime.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:655:79: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') ...( xmp->GetProperty( bextTimeReference.ns, bextTimeReference.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:678:61: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') if ( xmp->GetProperty( bextUMID.ns, bextUMID.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ RIFF_Support.cpp:697:79: error: cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int') ...( xmp->GetProperty( bextCodingHistory.ns, bextCodingHistory.prop, &value, kXMP_NoOptions ) ) ^~~~~~~~~~~~~~ ../../../public/include/XMP_Const.h:421:33: note: expanded from macro 'kXMP_NoOptions' #define kXMP_NoOptions ((XMP_OptionBits)0UL) ^~~~~~~~~~~~~~~~~~~~~ ../../../public/include/TXMPMeta.hpp:384:40: note: passing argument to parameter 'options' here XMP_OptionBits * options ) const; ^ Reported by: antoine (via bug 224669) Obtained from: upstream (exempi 2.4.0) Added: head/textproc/exempi/files/ head/textproc/exempi/files/patch-c++11 (contents, props changed) Added: head/textproc/exempi/files/patch-c++11 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/exempi/files/patch-c++11 Sat Jan 6 04:13:11 2018 (r458191) @@ -0,0 +1,147 @@ +Fix type mismatch in calls to XMPMeta::GetProperty + +kXMP_NoOptions is (XMP_OptionBits) whereas the final argument to +XMPMeta::GetProperty takes (XMP_OptionBits*) + +https://cgit.freedesktop.org/exempi/commit/?id=b6ff77dd74a1 + +--- source/XMPFiles/FormatSupport/ID3_Support.hpp.orig 2014-08-31 20:39:29 UTC ++++ source/XMPFiles/FormatSupport/ID3_Support.hpp +@@ -700,28 +700,28 @@ namespace ID3_Support + LFA_WriteUns8( file, 'G' ); + + // title ////////////////////////////////////////////////////// +- if ( meta->GetLocalizedText( kXMP_NS_DC, "title", "", "x-default", 0, &utf8, kXMP_NoOptions )) ++ if ( meta->GetLocalizedText( kXMP_NS_DC, "title", "", "x-default", 0, &utf8, 0 )) + { + LFA_Seek( file, -128 + 3, SEEK_END); + ReconcileUtils::UTF8ToLatin1( utf8.c_str(), utf8.size(), &latin1 ); + LFA_Write( file, latin1.c_str(), MIN( 30, (XMP_Int32)latin1.size() ) ); + } + // artist ////////////////////////////////////////////////////// +- if ( meta->GetProperty( kXMP_NS_DM, "artist", &utf8, kXMP_NoOptions )) ++ if ( meta->GetProperty( kXMP_NS_DM, "artist", &utf8, 0 )) + { + LFA_Seek( file, -128 + 33, SEEK_END); + ReconcileUtils::UTF8ToLatin1( utf8.c_str(), utf8.size(), &latin1 ); + LFA_Write( file, latin1.c_str(), MIN( 30, (XMP_Int32)latin1.size() ) ); + } + // album ////////////////////////////////////////////////////// +- if ( meta->GetProperty( kXMP_NS_DM, "album", &utf8, kXMP_NoOptions )) ++ if ( meta->GetProperty( kXMP_NS_DM, "album", &utf8, 0 )) + { + LFA_Seek( file, -128 + 63, SEEK_END); + ReconcileUtils::UTF8ToLatin1( utf8.c_str(), utf8.size(), &latin1 ); + LFA_Write( file, latin1.c_str(), MIN( 30, (XMP_Int32)latin1.size() ) ); + } + // year ////////////////////////////////////////////////////// +- if ( meta->GetProperty( kXMP_NS_XMP, "CreateDate", &utf8, kXMP_NoOptions )) ++ if ( meta->GetProperty( kXMP_NS_XMP, "CreateDate", &utf8, 0 )) + { + XMP_DateTime dateTime; + SXMPUtils::ConvertToDate( utf8, &dateTime ); +@@ -733,14 +733,14 @@ namespace ID3_Support + } + } + // comment (write 30 bytes first, see truncation later) //////////// +- if ( meta->GetProperty( kXMP_NS_DM, "logComment", &utf8, kXMP_NoOptions )) ++ if ( meta->GetProperty( kXMP_NS_DM, "logComment", &utf8, 0 )) + { + LFA_Seek ( file, -128 + 97, SEEK_END ); + ReconcileUtils::UTF8ToLatin1 ( utf8.c_str(), utf8.size(), &latin1 ); + LFA_Write ( file, latin1.c_str(), MIN ( 30, (XMP_Int32)latin1.size() ) ); + } + // genre //////////////////////////////////////////////////////////////// +- if ( meta->GetProperty( kXMP_NS_DM, "genre", &utf8, kXMP_NoOptions )) ++ if ( meta->GetProperty( kXMP_NS_DM, "genre", &utf8, 0 )) + { + XMP_Uns8 genreNo = 0; + +@@ -760,7 +760,7 @@ namespace ID3_Support + } + + // trackNo //////////////////////////////////////////////////////////// +- if ( meta->GetProperty( kXMP_NS_DM, "trackNumber", &utf8, kXMP_NoOptions )) ++ if ( meta->GetProperty( kXMP_NS_DM, "trackNumber", &utf8, 0 )) + { + XMP_Uns8 trackNo = 0; + try +--- source/XMPFiles/FormatSupport/RIFF_Support.cpp.orig 2014-08-31 20:39:29 UTC ++++ source/XMPFiles/FormatSupport/RIFF_Support.cpp +@@ -604,7 +604,7 @@ static void exportXMPtoBextChunk( RIFF_MetaHandler* ha + // prepare buffer, need to know CodingHistory size as the only variable + XMP_Int32 bextBufferSize = MIN_BEXT_SIZE - 8; // -8 because of header + std::string value; +- if ( xmp->GetProperty( bextCodingHistory.ns, bextCodingHistory.prop, &value, kXMP_NoOptions )) ++ if ( xmp->GetProperty( bextCodingHistory.ns, bextCodingHistory.prop, &value, 0 )) + { + bextBufferSize += ((XMP_StringLen)value.size()) + 1 ; // add to size (and a trailing zero) + } +@@ -616,35 +616,35 @@ static void exportXMPtoBextChunk( RIFF_MetaHandler* ha + + // grab props, write into buffer, remove from XMP /////////////////////////// + // bextDescription ------------------------------------------------ +- if ( xmp->GetProperty( bextDescription.ns, bextDescription.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextDescription.ns, bextDescription.prop, &value, 0 ) ) + { + setBextField( &value, (XMP_Uns8*) buffer, 0, 256 ); + xmp->DeleteProperty( bextDescription.ns, bextDescription.prop) ; + chunkUsed = true; + } + // bextOriginator ------------------------------------------------- +- if ( xmp->GetProperty( bextOriginator.ns , bextOriginator.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextOriginator.ns , bextOriginator.prop, &value, 0 ) ) + { + setBextField( &value, (XMP_Uns8*) buffer, 256, 32 ); + xmp->DeleteProperty( bextOriginator.ns , bextOriginator.prop ); + chunkUsed = true; + } + // bextOriginatorRef ---------------------------------------------- +- if ( xmp->GetProperty( bextOriginatorRef.ns , bextOriginatorRef.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextOriginatorRef.ns , bextOriginatorRef.prop, &value, 0 ) ) + { + setBextField( &value, (XMP_Uns8*) buffer, 256+32, 32 ); + xmp->DeleteProperty( bextOriginatorRef.ns , bextOriginatorRef.prop ); + chunkUsed = true; + } + // bextOriginationDate -------------------------------------------- +- if ( xmp->GetProperty( bextOriginationDate.ns , bextOriginationDate.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextOriginationDate.ns , bextOriginationDate.prop, &value, 0 ) ) + { + setBextField( &value, (XMP_Uns8*) buffer, 256+32+32, 10 ); + xmp->DeleteProperty( bextOriginationDate.ns , bextOriginationDate.prop ); + chunkUsed = true; + } + // bextOriginationTime -------------------------------------------- +- if ( xmp->GetProperty( bextOriginationTime.ns , bextOriginationTime.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextOriginationTime.ns , bextOriginationTime.prop, &value, 0 ) ) + { + setBextField( &value, (XMP_Uns8*) buffer, 256+32+32+10, 8 ); + xmp->DeleteProperty( bextOriginationTime.ns , bextOriginationTime.prop ); +@@ -652,7 +652,7 @@ static void exportXMPtoBextChunk( RIFF_MetaHandler* ha + } + // bextTimeReference ---------------------------------------------- + // thanx to friendly byte order, all 8 bytes can be written in one go: +- if ( xmp->GetProperty( bextTimeReference.ns, bextTimeReference.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextTimeReference.ns, bextTimeReference.prop, &value, 0 ) ) + { + try + { +@@ -675,7 +675,7 @@ static void exportXMPtoBextChunk( RIFF_MetaHandler* ha + xmp->DeleteProperty( bextVersion.ns, bextVersion.prop ); + + // bextUMID ------------------------------------------------------- +- if ( xmp->GetProperty( bextUMID.ns, bextUMID.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextUMID.ns, bextUMID.prop, &value, 0 ) ) + { + std::string rawStr; + +@@ -694,7 +694,7 @@ static void exportXMPtoBextChunk( RIFF_MetaHandler* ha + } + + // bextCodingHistory ---------------------------------------------- +- if ( xmp->GetProperty( bextCodingHistory.ns, bextCodingHistory.prop, &value, kXMP_NoOptions ) ) ++ if ( xmp->GetProperty( bextCodingHistory.ns, bextCodingHistory.prop, &value, 0 ) ) + { + std::string ascii; + convertToASCII( value.data(), (XMP_StringLen) value.size() , &ascii, (XMP_StringLen) value.size() );
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801060413.w064DBWa067513>