From 24c9e457890fc3d733dbd28029967b1bc0d2569e Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 20 Jan 2015 14:56:18 +0100 Subject: [PATCH] Fixed "warning: invalid suffix on literal" with GCC 4.8 and C++11 --- CONTRIBUTORS | 1 + HISTORY | 2 ++ dvbsubtitle.c | 12 ++++++------ recording.c | 6 +++--- remote.c | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 988a80f4..926bdd1a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2969,6 +2969,7 @@ Dominik Strasser Joerg Bornkessel for adding LDFLAGS to the linker calls in the Makefiles for fixing font handling with fontconfig 2.9.0 or newer + for fixing "warning: invalid suffix on literal" with GCC 4.8 and C++11 Andreas Oberritter for suggesting to retrieve the include path to the freetype2 header files diff --git a/HISTORY b/HISTORY index 8adc65ca..493ec703 100644 --- a/HISTORY +++ b/HISTORY @@ -8417,3 +8417,5 @@ Video Disk Recorder Revision History 2015-01-20: Version 2.1.8 - Updated the Italian OSD texts (thanks to Diego Pierotto). +- Fixed "warning: invalid suffix on literal" with GCC 4.8 and C++11 (thanks to Joerg + Bornkessel). diff --git a/dvbsubtitle.c b/dvbsubtitle.c index 5df8cdb6..d5ae60b0 100644 --- a/dvbsubtitle.c +++ b/dvbsubtitle.c @@ -7,7 +7,7 @@ * Original author: Marco Schluessler * With some input from the "subtitles plugin" by Pekka Virtanen * - * $Id: dvbsubtitle.c 3.9 2015/01/14 11:31:09 kls Exp $ + * $Id: dvbsubtitle.c 3.10 2015/01/20 14:53:57 kls Exp $ */ #include "dvbsubtitle.h" @@ -1042,7 +1042,7 @@ void cDvbSubtitlePage::Parse(int64_t Pts, cBitStream &bs) default: dbgpages("unknown page state: %d
\n", pageState); } bs.SkipBits(2); // reserved - dbgpages("
\npage id %d version %d pts %"PRId64" timeout %d state %d
\n", pageId, pageVersionNumber, pts, pageTimeout, pageState); + dbgpages("
\npage id %d version %d pts %" PRId64 " timeout %d state %d
\n", pageId, pageVersionNumber, pts, pageTimeout, pageState); regionRefs.Clear(); while (!bs.IsEOF()) regionRefs.Add(new cSubtitleRegionRef(bs)); @@ -1073,7 +1073,7 @@ void cDvbSubtitlePage::ParsePgs(int64_t Pts, cBitStream &bs) default: dbgpages("unknown page state: %d
\n", pageState); } bs.SkipBits(6); - dbgpages("
\npage id %d version %d pts %"PRId64" timeout %d state %d
\n", pageId, pageVersionNumber, pts, pageTimeout, pageState); + dbgpages("
\npage id %d version %d pts %" PRId64 " timeout %d state %d
\n", pageId, pageVersionNumber, pts, pageTimeout, pageState); regionRefs.Clear(); pending = true; } @@ -1384,7 +1384,7 @@ int cDvbSubtitleConverter::ConvertFragments(const uchar *Data, int Length) if (Length > PayloadOffset + SubstreamHeaderLength) { int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : -1; if (pts >= 0) - 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) @@ -1420,7 +1420,7 @@ int cDvbSubtitleConverter::Convert(const uchar *Data, int Length) if (Length > PayloadOffset) { int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : -1; if (pts >= 0) - dbgconverter("converter PTS: %"PRId64"
\n", pts); + dbgconverter("converter PTS: %" PRId64 "
\n", pts); const uchar *data = Data + PayloadOffset; int length = Length - PayloadOffset; if (length > 0) { @@ -1488,7 +1488,7 @@ void cDvbSubtitleConverter::Action(void) dbgoutput("showing bitmap #%d of %d
\n", sb->Index() + 1, bitmaps->Count()); sb->Draw(osd); Timeout.Set(sb->Timeout() * 1000); - dbgconverter("PTS: %"PRId64" STC: %"PRId64" (%"PRId64") timeout: %d
\n", sb->Pts(), STC, Delta, sb->Timeout()); + dbgconverter("PTS: %" PRId64 " STC: %" PRId64 " (%" PRId64 ") timeout: %d
\n", sb->Pts(), STC, Delta, sb->Timeout()); } } else diff --git a/recording.c b/recording.c index e9a6b169..30335e78 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 3.21 2015/01/17 14:52:28 kls Exp $ + * $Id: recording.c 3.22 2015/01/20 14:53:57 kls Exp $ */ #include "recording.h" @@ -1749,7 +1749,7 @@ void cDirCopier::Action(void) off_t FileSizeSrc = FileSize(FileNameSrc); off_t FileSizeDst = FileSize(FileNameDst); if (FileSizeSrc != FileSizeDst) { - esyslog("ERROR: file size discrepancy: %"PRId64" != %"PRId64, FileSizeSrc, FileSizeDst); + esyslog("ERROR: file size discrepancy: %" PRId64 " != %" PRId64, FileSizeSrc, FileSizeDst); break; } } @@ -2476,7 +2476,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording, b 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 || Update) && last >= 0) { diff --git a/remote.c b/remote.c index 5cb2ccb8..ac10dce7 100644 --- a/remote.c +++ b/remote.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.c 3.2 2014/02/15 12:40:39 kls Exp $ + * $Id: remote.c 3.3 2015/01/20 14:53:57 kls Exp $ */ #include "remote.h" @@ -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); }