From owner-svn-ports-all@freebsd.org Sat Jan 6 05:07:25 2018 Return-Path: Delivered-To: svn-ports-all@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 C2580EB9F95; Sat, 6 Jan 2018 05:07:25 +0000 (UTC) (envelope-from jbeich@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 8A60E73CF0; Sat, 6 Jan 2018 05:07:25 +0000 (UTC) (envelope-from jbeich@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 AD391AF89; Sat, 6 Jan 2018 05:07:24 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0657O5C090692; Sat, 6 Jan 2018 05:07:24 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0657OqS090691; Sat, 6 Jan 2018 05:07:24 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801060507.w0657OqS090691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sat, 6 Jan 2018 05:07:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458210 - head/multimedia/vdr/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/multimedia/vdr/files X-SVN-Commit-Revision: 458210 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 05:07:25 -0000 Author: jbeich Date: Sat Jan 6 05:07:24 2018 New Revision: 458210 URL: https://svnweb.freebsd.org/changeset/ports/458210 Log: multimedia/vdr: unbreak build with Clang 6 (C++14 by default) dvbsubtitle.c:854:43: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] dbgconverter("Converter PTS: %"PRId64"\n", pts); ^ dvbsubtitle.c:890:43: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] dbgconverter("Converter PTS: %"PRId64"\n", pts); ^ dvbsubtitle.c:949:45: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] dbgconverter("PTS: %"PRId64" STC: %"PRId64" (%"PRId64") timeout: %d\n", sb->Pts()... ^ dvbsubtitle.c:949:61: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] dbgconverter("PTS: %"PRId64" STC: %"PRId64" (%"PRId64") timeout: %d\n", sb->Pts()... ^ dvbsubtitle.c:949:72: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] dbgconverter("PTS: %"PRId64" STC: %"PRId64" (%"PRId64") timeout: %d\n", sb->Pts()... ^ dvbsubtitle.c:1047:58: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] dbgpages("Update page id %d version %d pts %"PRId64" timeout %d state %d\n", pageId, page->Ver... ^ 6 errors generated. recording.c:1646:52: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] esyslog("ERROR: invalid file size (%"PRId64") in '%s'", buf.st_size, *fileName); ^ 1 error generated. remote.c:127:42: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] snprintf(buffer, sizeof(buffer), "%016"PRIX64, Code); ^ ci.c:854:40: error: non-constant-expression cannot be narrowed from type 'int' to 'uint8_t' (aka 'unsigned char') in initializer list [-Wc++11-narrowing] tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm... ^~~~~~~~~~~~~~~~~~~~~~~ ci.c:852:20: note: expanded from macro 'DEC2BCD' #define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:40: note: insert an explicit cast to silence this issue tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm... ^~~~~~~~~~~~~~~~~~~~~~~ static_cast( ) ci.c:852:20: note: expanded from macro 'DEC2BCD' #define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:69: error: non-constant-expression cannot be narrowed from type 'int' to 'uint8_t' (aka 'unsigned char') in initializer list [-Wc++11-narrowing] tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm... ^~~~~~~~~~~~~~~~~~~~~~ ci.c:852:20: note: expanded from macro 'DEC2BCD' #define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:69: note: insert an explicit cast to silence this issue tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm... ^~~~~~~~~~~~~~~~~~~~~~ static_cast( ) ci.c:852:20: note: expanded from macro 'DEC2BCD' #define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:97: error: non-constant-expression cannot be narrowed from type 'int' to 'uint8_t' (aka 'unsigned char') in initializer list [-Wc++11-narrowing] ...htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : ... ^~~~~~~~~~~~~~~~~~~~~~ ci.c:852:20: note: expanded from macro 'DEC2BCD' #define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:97: note: insert an explicit cast to silence this issue ...htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : ... ^~~~~~~~~~~~~~~~~~~~~~ static_cast( ) ci.c:852:20: note: expanded from macro 'DEC2BCD' #define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:130: error: non-constant-expression cannot be narrowed from type '__uint16_t' (aka 'unsigned short') to 'short' in initializer list [-Wc++11-narrowing] ...m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : htons(tm_loc.tm_gmtoff / 60) }; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/arpa/inet.h:173:18: note: expanded from macro 'htons' #define htons(x) __htons(x) ^~~~~~~~~~ /usr/include/x86/endian.h:129:20: note: expanded from macro '__htons' #define __htons(x) __bswap16(x) ^~~~~~~~~~~~ /usr/include/x86/endian.h:76:2: note: expanded from macro '__bswap16' ((__uint16_t)(__builtin_constant_p(x) ? \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ci.c:854:130: note: insert an explicit cast to silence this issue ...m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : htons(tm_loc.tm_gmtoff / 60) }; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast( ) /usr/include/arpa/inet.h:173:18: note: expanded from macro 'htons' #define htons(x) __htons(x) ^~~~~~~~~~ /usr/include/x86/endian.h:129:20: note: expanded from macro '__htons' #define __htons(x) __bswap16(x) ^~~~~~~~~~~~ /usr/include/x86/endian.h:76:2: note: expanded from macro '__bswap16' ((__uint16_t)(__builtin_constant_p(x) ? \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported by: antoine (via bug 224669) Added: head/multimedia/vdr/files/patch-c++11 (contents, props changed) Added: head/multimedia/vdr/files/patch-c++11 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/vdr/files/patch-c++11 Sat Jan 6 05:07:24 2018 (r458210) @@ -0,0 +1,74 @@ +--- ci.c.orig 2012-05-29 11:13:40 UTC ++++ ci.c +@@ -845,9 +845,9 @@ void cCiDateTime::SendDateTime(void) + int D = tm_gmt.tm_mday; + int L = (M == 1 || M == 2) ? 1 : 0; + int MJD = 14956 + D + int((Y - L) * 365.25) + int((M + 1 + L * 12) * 30.6001); +-#define DEC2BCD(d) (((d / 10) << 4) + (d % 10)) ++#define DEC2BCD(d) uint8_t(((d / 10) << 4) + (d % 10)) + struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; }; +- tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : htons(tm_loc.tm_gmtoff / 60) }; ++ tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) }; + bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer; + DumpTPDUDataTransfer &= DumpDateTime; + if (DumpDateTime) +--- dvbsubtitle.c.orig 2012-05-08 08:17:17 UTC ++++ dvbsubtitle.c +@@ -851,7 +851,7 @@ int cDvbSubtitleConverter::ConvertFragments(const ucha + if (Length > PayloadOffset + SubstreamHeaderLength) { + int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : 0; + if (pts) +- dbgconverter("Converter PTS: %"PRId64"\n", pts); ++ dbgconverter("Converter PTS: %" PRId64 "\n", pts); + const uchar *data = Data + PayloadOffset + SubstreamHeaderLength; // skip substream header + int length = Length - PayloadOffset - SubstreamHeaderLength; // skip substream header + if (ResetSubtitleAssembler) +@@ -887,7 +887,7 @@ int cDvbSubtitleConverter::Convert(const uchar *Data, + if (Length > PayloadOffset) { + int64_t pts = PesGetPts(Data); + if (pts) +- dbgconverter("Converter PTS: %"PRId64"\n", pts); ++ dbgconverter("Converter PTS: %" PRId64 "\n", pts); + const uchar *data = Data + PayloadOffset; + int length = Length - PayloadOffset; + if (length > 3) { +@@ -946,7 +946,7 @@ void cDvbSubtitleConverter::Action(void) + if (AssertOsd()) { + sb->Draw(osd); + Timeout.Set(sb->Timeout() * 1000); +- dbgconverter("PTS: %"PRId64" STC: %"PRId64" (%"PRId64") timeout: %d\n", sb->Pts(), cDevice::PrimaryDevice()->GetSTC(), Delta, sb->Timeout()); ++ dbgconverter("PTS: %" PRId64 " STC: %" PRId64 " (%" PRId64 ") timeout: %d\n", sb->Pts(), cDevice::PrimaryDevice()->GetSTC(), Delta, sb->Timeout()); + } + bitmaps->Del(sb); + } +@@ -1044,7 +1044,7 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar + page->SetTimeout(pageTimeout); + page->SetState(bs.GetBits(2)); + bs.SkipBits(2); // reserved +- dbgpages("Update page id %d version %d pts %"PRId64" timeout %d state %d\n", pageId, page->Version(), page->Pts(), page->Timeout(), page->State()); ++ dbgpages("Update page id %d version %d pts %" PRId64 " timeout %d state %d\n", pageId, page->Version(), page->Pts(), page->Timeout(), page->State()); + while (!bs.IsEOF()) { + cSubtitleRegion *region = page->GetRegionById(bs.GetBits(8), true); + bs.SkipBits(8); // reserved +--- recording.c.orig 2012-06-09 13:57:30 UTC ++++ recording.c +@@ -1643,7 +1643,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Reco + delta = int(buf.st_size % sizeof(tIndexTs)); + if (delta) { + delta = sizeof(tIndexTs) - delta; +- esyslog("ERROR: invalid file size (%"PRId64") in '%s'", buf.st_size, *fileName); ++ esyslog("ERROR: invalid file size (%" PRId64 ") in '%s'", buf.st_size, *fileName); + } + last = int((buf.st_size + delta) / sizeof(tIndexTs) - 1); + if (!Record && last >= 0) { +--- remote.c.orig 2012-01-16 16:57:00 UTC ++++ remote.c +@@ -124,7 +124,7 @@ bool cRemote::PutMacro(eKeys Key) + bool cRemote::Put(uint64_t Code, bool Repeat, bool Release) + { + char buffer[32]; +- snprintf(buffer, sizeof(buffer), "%016"PRIX64, Code); ++ snprintf(buffer, sizeof(buffer), "%016" PRIX64, Code); + return Put(buffer, Repeat, Release); + } +