From owner-svn-ports-head@freebsd.org Sat Jan 20 23:58:55 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C59E8ECEB71; Sat, 20 Jan 2018 23:58:55 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A051D70DFB; Sat, 20 Jan 2018 23:58:55 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E12632368E; Sat, 20 Jan 2018 23:58:54 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0KNws62087654; Sat, 20 Jan 2018 23:58:54 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0KNwsMq087652; Sat, 20 Jan 2018 23:58:54 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201801202358.w0KNwsMq087652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Sat, 20 Jan 2018 23:58:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459558 - head/sysutils/k3b-kde4/files X-SVN-Group: ports-head X-SVN-Commit-Author: rakuco X-SVN-Commit-Paths: head/sysutils/k3b-kde4/files X-SVN-Commit-Revision: 459558 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2018 23:58:55 -0000 Author: rakuco Date: Sat Jan 20 23:58:54 2018 New Revision: 459558 URL: https://svnweb.freebsd.org/changeset/ports/459558 Log: Backport a few upstream patches to fix the build with clang 6 (-std=gnu++14) PR: 224945 Added: head/sysutils/k3b-kde4/files/patch-git_1777236 (contents, props changed) head/sysutils/k3b-kde4/files/patch-git_d5b1016 (contents, props changed) Added: head/sysutils/k3b-kde4/files/patch-git_1777236 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/k3b-kde4/files/patch-git_1777236 Sat Jan 20 23:58:54 2018 (r459558) @@ -0,0 +1,67 @@ +Fix the build with clang 6, which defaults to -std=gnu++14 + +plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:264:20: error: comparison between pointer and integer ('char *' and 'int') + if( ade->value != '\0' ) + ~~~~~~~~~~ ^ ~~~~ +plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:277:20: error: comparison between pointer and integer ('char *' and 'int') + if( ade->value != '\0' ) + ~~~~~~~~~~ ^ ~~~~ +plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp:290:20: error: comparison between pointer and integer ('char *' and 'int') + if( ade->value != '\0' ) + ~~~~~~~~~~ ^ ~~~~ + +commit 1777236203f21eed7a9baade632472094c8081d3 +Author: Pino Toscano +Date: Sat Feb 4 10:48:45 2017 +0100 + + ffmpeg: fix/simplify metadata conversion to string + + Comparing a pointer with an integer value is (correctly) an error with + GCC 7. + +diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp +index a4fc784b5..22928b279 100644 +--- plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp ++++ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp +@@ -259,12 +259,7 @@ QString K3bFFMpegFile::title() const + { + // FIXME: is this UTF8 or something?? + AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "TITLE", NULL, 0 ); +- if( ade == NULL ) +- return QString(); +- if( ade->value != '\0' ) +- return QString::fromLocal8Bit( ade->value ); +- else +- return QString(); ++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit( ade->value ) : QString(); + } + + +@@ -272,12 +267,7 @@ QString K3bFFMpegFile::author() const + { + // FIXME: is this UTF8 or something?? + AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "ARTIST", NULL, 0 ); +- if( ade == NULL ) +- return QString(); +- if( ade->value != '\0' ) +- return QString::fromLocal8Bit( ade->value ); +- else +- return QString(); ++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit( ade->value ) : QString(); + } + + +@@ -285,12 +275,7 @@ QString K3bFFMpegFile::comment() const + { + // FIXME: is this UTF8 or something?? + AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "COMMENT", NULL, 0 ); +- if( ade == NULL ) +- return QString(); +- if( ade->value != '\0' ) +- return QString::fromLocal8Bit( ade->value ); +- else +- return QString(); ++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit( ade->value ) : QString(); + } + + Added: head/sysutils/k3b-kde4/files/patch-git_d5b1016 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/k3b-kde4/files/patch-git_d5b1016 Sat Jan 20 23:58:54 2018 (r459558) @@ -0,0 +1,93 @@ +Fix the build with clang 6, which defaults to -std=gnu++14 + +(slightly adapted to v2.0.3) + +libk3b/tools/k3bwavefilewriter.cpp:120:19: error: constant expression evaluates to 172 which cannot be narrowed to type 'char' [-Wc++11-narrowing] + 0x44, 0xac, 0x00, 0x00, // 24 + ^~~~ +libk3b/tools/k3bwavefilewriter.cpp:120:19: note: insert an explicit cast to silence this issue + 0x44, 0xac, 0x00, 0x00, // 24 + ^~~~ + static_cast( ) +libk3b/tools/k3bwavefilewriter.cpp:121:19: error: constant expression evaluates to 177 which cannot be narrowed to type 'char' [-Wc++11-narrowing] + 0x10, 0xb1, 0x02, 0x00, // 28 + ^~~~ +libk3b/tools/k3bwavefilewriter.cpp:121:19: note: insert an explicit cast to silence this issue + 0x10, 0xb1, 0x02, 0x00, // 28 + ^~~~ + static_cast( ) + +commit d5b1016e6a4c1dfcf681ce33ea9ffdd0dd5daf24 +Author: Armin K +Date: Mon May 4 00:01:03 2015 +0200 + + Fix build failure when compiling with GCC 5 + + REVIEW: 123431 + +diff --git a/libk3b/projects/k3bcdrdaowriter.cpp b/libk3b/projects/k3bcdrdaowriter.cpp +index 0d144086d..dafb1bf69 100644 +--- libk3b/projects/k3bcdrdaowriter.cpp ++++ libk3b/projects/k3bcdrdaowriter.cpp +@@ -918,7 +918,7 @@ void K3b::CdrdaoWriter::parseCdrdaoWrote( const QString& line ) + + void K3b::CdrdaoWriter::parseCdrdaoMessage() + { +- static const char msgSync[] = { 0xff, 0x00, 0xff, 0x00 }; ++ static const unsigned char msgSync[] = { 0xff, 0x00, 0xff, 0x00 }; + unsigned int avail = m_comSock->bytesAvailable(); + unsigned int msgs = avail / ( sizeof(msgSync)+d->progressMsgSize ); + unsigned int count = 0; +diff --git a/libk3b/tools/k3bwavefilewriter.cpp b/libk3b/tools/k3bwavefilewriter.cpp +index 7aa6c1d67..25b425f50 100644 +--- libk3b/tools/k3bwavefilewriter.cpp ++++ libk3b/tools/k3bwavefilewriter.cpp +@@ -109,7 +109,7 @@ void K3b::WaveFileWriter::write( const char* data, int len, Endianess e ) + + void K3b::WaveFileWriter::writeEmptyHeader() + { +- static const char riffHeader[] = ++ static const unsigned char riffHeader[] = + { + 0x52, 0x49, 0x46, 0x46, // 0 "RIFF" + 0x00, 0x00, 0x00, 0x00, // 4 wavSize +@@ -124,7 +124,7 @@ void K3b::WaveFileWriter::writeEmptyHeader() + 0x00, 0x00, 0x00, 0x00 // 40 byteCount + }; + +- m_outputStream.writeRawData( riffHeader, 44 ); ++ m_outputStream.writeRawData( (const char*) riffHeader, 44 ); + } + + +diff --git a/plugins/encoder/external/k3bexternalencoder.cpp b/plugins/encoder/external/k3bexternalencoder.cpp +index df9c576d8..d68f2003b 100644 +--- plugins/encoder/external/k3bexternalencoder.cpp ++++ plugins/encoder/external/k3bexternalencoder.cpp +@@ -37,7 +37,7 @@ K3B_EXPORT_PLUGIN(k3bexternalencoder, K3bExternalEncoder) + Q_DECLARE_METATYPE( QProcess::ExitStatus ) + + +-static const char s_riffHeader[] = ++static const unsigned char s_riffHeader[] = + { + 0x52, 0x49, 0x46, 0x46, // 0 "RIFF" + 0x00, 0x00, 0x00, 0x00, // 4 wavSize +@@ -222,7 +222,7 @@ bool K3bExternalEncoder::writeWaveHeader() + qDebug() << "(K3bExternalEncoder) writing wave header"; + + // write the RIFF thing +- if( d->process->write( s_riffHeader, 4 ) != 4 ) { ++ if( d->process->write( (const char*) s_riffHeader, 4 ) != 4 ) { + qDebug() << "(K3bExternalEncoder) failed to write riff header."; + return false; + } +@@ -243,7 +243,7 @@ bool K3bExternalEncoder::writeWaveHeader() + } + + // write static part of the header +- if( d->process->write( s_riffHeader + 8, 32 ) != 32 ) { ++ if( d->process->write( (const char*) s_riffHeader + 8, 32 ) != 32 ) { + qDebug() << "(K3bExternalEncoder) failed to write wave header."; + return false; + }