From patchwork Sat Feb 8 12:51:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 22065 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1WC7NR-0002la-MN; Sat, 08 Feb 2014 13:51:21 +0100 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1WC7NP-0002lV-CQ for vdr@linuxtv.org; Sat, 08 Feb 2014 13:51:20 +0100 X-tubIT-Incoming-IP: 188.40.50.18 Received: from racoon.tvdr.de ([188.40.50.18]) by mail.tu-berlin.de (exim-4.72/mailfrontend-5) with esmtps [TLSv1:AES256-SHA:256] for id 1WC7NN-0004Gc-7K; Sat, 08 Feb 2014 13:51:19 +0100 Received: from dolphin.tvdr.de (dolphin.tvdr.de [192.168.100.2]) by racoon.tvdr.de (8.14.5/8.14.5) with ESMTP id s18CpGY2032552 for ; Sat, 8 Feb 2014 13:51:16 +0100 Received: from [192.168.100.11] (falcon.tvdr.de [192.168.100.11]) by dolphin.tvdr.de (8.14.4/8.14.4) with ESMTP id s18CpAYq002616 for ; Sat, 8 Feb 2014 13:51:10 +0100 Message-ID: <52F6283E.8070001@tvdr.de> Date: Sat, 08 Feb 2014 13:51:10 +0100 From: Klaus Schmidinger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: vdr@linuxtv.org References: <1391849989.4914.15.camel@mattotaupa> In-Reply-To: <1391849989.4914.15.camel@mattotaupa> X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.2.8.123915 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, BODY_SIZE_10000_PLUS 0, __ANY_URI 0, __BAT_BOUNDARY 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __SANE_MSGID 0, __STOCK_PHRASE_24 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RDNS_NONE=0.793 autolearn=no Subject: Re: [vdr] Logs from building VDR 2.1.3 with Clang 3.4.1 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org On 08.02.2014 09:59, Paul Menzel wrote: > Dear VDR folks, > > > building VDR 2.1.3 with Clang 3.4.1 the warnings below are shown. > > Most warnings look like they can be ignored. Maybe you can spot > something, which should be fixed. > > $ clang --version > Debian clang version 3.4-1 (tags/RELEASE_34/final) (based on LLVM 3.4) > Target: i386-pc-linux-gnu > Thread model: posix > $ CC=clang CXX=clang++ make > […] > clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated You may want to find an option that suppresses this warning, because the file names of VDR (*.c) are not going to change. > ... > channels.c:45:119: warning: data argument not used by format string [-Wformat-extra-args] > snprintf(buffer, sizeof(buffer), rid ? "%s-%d-%d-%d-%d" : "%s-%d-%d-%d", *cSource::ToString(source), nid, tid, sid, rid); > ~~~~~~~~~~~~~ ^ This is explicitly checked with 'rid ? ...', so the warning is unjustified (although the compiler probably has a hard time figuring that out ;-). > ... > ci.c:867:18: warning: use of GNU old-style field designator extension [-Wgnu-designator] > 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(... > ^~~~~ > .mjd = > ci.c:867:36: warning: use of GNU old-style field designator extension [-Wgnu-designator] > 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(... > ^~~ > .h = > ci.c:867:65: warning: use of GNU old-style field designator extension [-Wgnu-designator] > 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(... > ^~~ > .m = > ci.c:867:93: warning: use of GNU old-style field designator extension [-Wgnu-designator] > 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(... > ^~~ > .s = > ci.c:867:121: warning: use of GNU old-style field designator extension [-Wgnu-designator] > 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_lo... > ^~~~~~~~ > .offset = > ci.c:1007:47: warning: use of GNU old-style field designator extension [-Wgnu-designator] > tDisplayReply dr = { id : DRI_MMI_MODE_ACK, mode : MM_HIGH_LEVEL }; > ^~~~ > .id = > ci.c:1007:70: warning: use of GNU old-style field designator extension [-Wgnu-designator] > tDisplayReply dr = { id : DRI_MMI_MODE_ACK, mode : MM_HIGH_LEVEL }; > ^~~~~~ > .mode = Fixed in the attached patch. > ... > In file included from dvbspu.c:14: > ./dvbspu.h:104:10: warning: private field 'ready' is not used [-Wunused-private-field] > bool ready; > ^ Fixed in the attached patch. > ... > dvbsubtitle.c:37:13: warning: unused variable 'DebugBitmaps' [-Wunused-variable] > static bool DebugBitmaps = DebugVerbose || DebugNormal; > ^ Fixed in the attached patch. > ... > eit.c:223:43: warning: comparison of constant 176 with expression of type 'SI::LinkageType' is always false > [-Wtautological-constant-out-of-range-compare] > if (ld->getLinkageType() == 0xB0) { // Premiere World > ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ I assume this is because the enum LinkageType doesn't contain 0xB0. However, the actual value that comes from the SI data may well be 0xB0, so I'm now typecasting uint(ld->getLinkageType()). > ... > menu.c:982:38: warning: first operand of this 'memcmp' call is a pointer to dynamic class 'cTimer'; vtable pointer will be compared > [-Wdynamic-class-memaccess] > if (memcmp(timer, &data, sizeof(data)) != 0) > ~~~~~~ ^ > menu.c:982:38: note: explicitly cast the pointer to silence this warning > if (memcmp(timer, &data, sizeof(data)) != 0) > ^ > (void*) Fixed in the attached patch. > menu.c:4582:107: warning: data argument not used by format string [-Wformat-extra-args] > instantId = cString::sprintf(cDevice::NumDevices() > 1 ? "%s - %d" : "%s", timer->Channel()->Name(), device->CardIndex() + 1); > ~~~~ ^ Same as above (channels.c:45:119). > ... > menuitems.c:249:86: warning: data argument not used by format string [-Wformat-extra-args] > SetValue(cString::sprintf(s ? "%.*f %s" : "%.*f", factor / 10, double(v) / factor, s)); > ~~~~~~ ^ Same as above. > ... > receiver.c:28:6: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] > *(char *)0 = 0; // cause a segfault > ^~~~~~~~~~ > receiver.c:28:6: note: consider using __builtin_trap() or qualifying pointer with 'volatile' Can you suggest a different way of causing a segfault at this point? > ... > recording.c:2923:96: warning: data argument not used by format string [-Wformat-extra-args] > return cString::sprintf(WithFrame ? "%s%d:%02d:%02d.%02d" : "%s%d:%02d:%02d", Sign, h, m, s, f); > ~~~~~~~~~~~~~~~~ ^ Same as above. > ... > In file included from remux.c:10: > ./remux.h:479:7: warning: private field 'numFrames' is not used [-Wunused-private-field] > int numFrames; > ^ Fixed in the attached patch. > ... > In file included from descriptor.c:14: > ./descriptor.h:493:34: warning: private field 's' is not used [-Wunused-private-field] > const descr_iso_639_language *s; > ^ Fixed in the attached patch. > ... > hdffosd.c:45:14: warning: private field 'mBitmapNumColors' is not used [-Wunused-private-field] > uint32_t mBitmapNumColors; > ^ > hdffosd.c:558:14: warning: private field 'mBitmapNumColors' is not used [-Wunused-private-field] > uint32_t mBitmapNumColors; > ^ Fixed in the attached patch. > ... > *** Plugin pictures: > ... > player.c:222:15: warning: case value not in enumerated type 'eKeys' [-Wswitch] > case kLeft|k_Repeat: > ^ > player.c:226:16: warning: case value not in enumerated type 'eKeys' [-Wswitch] > case kRight|k_Repeat: Fixed in the attached patch. Klaus =================================================================== RCS file: ./PLUGINS/src/dvbhddevice/RCS/hdffosd.c retrieving revision 3.0 diff -u -b -r3.0 ./PLUGINS/src/dvbhddevice/hdffosd.c --- ./PLUGINS/src/dvbhddevice/hdffosd.c 2013/03/02 17:58:21 3.0 +++ ./PLUGINS/src/dvbhddevice/hdffosd.c 2014/02/08 12:46:14 @@ -42,7 +42,6 @@ tFont mFonts[MAX_NUM_FONTS]; uint32_t mBitmapPalette; uint32_t mBitmapColors[256]; - uint32_t mBitmapNumColors; bool mSupportsUtf8Text; @@ -555,7 +554,6 @@ uint32_t mDisplay; uint32_t mBitmapPalette; uint32_t mBitmapColors[256]; - uint32_t mBitmapNumColors; protected: virtual void SetActive(bool On); =================================================================== RCS file: ./PLUGINS/src/pictures/RCS/player.c retrieving revision 3.0 diff -u -b -r3.0 ./PLUGINS/src/pictures/player.c --- ./PLUGINS/src/pictures/player.c 2012/04/28 11:58:15 3.0 +++ ./PLUGINS/src/pictures/player.c 2014/02/08 12:48:12 @@ -211,7 +211,7 @@ eOSState cPictureControl::ProcessKey(eKeys Key) { - switch (Key) { + switch (int(Key)) { case kUp: case kPlay: slideShowDelay.Set(); slideShow = true; =================================================================== RCS file: ./RCS/ci.c retrieving revision 3.10 diff -u -b -r3.10 ./ci.c --- ./ci.c 2014/01/22 09:46:38 3.10 +++ ./ci.c 2014/02/08 12:25:55 @@ -864,7 +864,7 @@ #pragma pack(1) struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; }; #pragma pack() - 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)) }; + 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) @@ -1004,7 +1004,7 @@ case DCC_SET_MMI_MODE: if (l == 2 && *++d == MM_HIGH_LEVEL) { struct tDisplayReply { uint8_t id; uint8_t mode; }; - tDisplayReply dr = { id : DRI_MMI_MODE_ACK, mode : MM_HIGH_LEVEL }; + tDisplayReply dr = { .id = DRI_MMI_MODE_ACK, .mode = MM_HIGH_LEVEL }; dbgprotocol("Slot %d: ==> Display Reply (%d)\n", Tc()->CamSlot()->SlotNumber(), SessionId()); SendData(AOT_DISPLAY_REPLY, 2, (uint8_t *)&dr); } =================================================================== RCS file: ./RCS/dvbspu.h retrieving revision 3.0 diff -u -b -r3.0 ./dvbspu.h --- ./dvbspu.h 2013/01/20 10:15:47 3.0 +++ ./dvbspu.h 2014/02/08 12:27:34 @@ -101,7 +101,6 @@ uint8_t *spu; uint32_t spupts; bool clean; - bool ready; bool restricted_osd; enum spFlag { spNONE, spHIDE, spSHOW, spMENU }; =================================================================== RCS file: ./RCS/dvbsubtitle.c retrieving revision 3.4 diff -u -b -r3.4 ./dvbsubtitle.c --- ./dvbsubtitle.c 2013/09/07 10:39:46 3.4 +++ ./dvbsubtitle.c 2014/02/08 12:29:13 @@ -34,7 +34,6 @@ static bool DebugPages = DebugVerbose || DebugNormal; static bool DebugRegions = DebugVerbose || DebugNormal; static bool DebugObjects = DebugVerbose || DebugNormal; -static bool DebugBitmaps = DebugVerbose || DebugNormal; static bool DebugConverter = DebugVerbose; static bool DebugSegments = DebugVerbose; static bool DebugPixel = DebugVerbose; @@ -45,7 +44,6 @@ #define dbgpages(a...) if (DebugPages) SD.WriteHtml(a) #define dbgregions(a...) if (DebugRegions) SD.WriteHtml(a) #define dbgobjects(a...) if (DebugObjects) SD.WriteHtml(a) -#define dbgbitmaps(a...) if (DebugBitmaps) SD.WriteHtml(a) #define dbgconverter(a...) if (DebugConverter) SD.WriteHtml(a) #define dbgsegments(a...) if (DebugSegments) SD.WriteHtml(a) #define dbgpixel(a...) if (DebugPixel) SD.WriteHtml(a) =================================================================== RCS file: ./RCS/eit.c retrieving revision 3.3 diff -u -b -r3.3 ./eit.c --- ./eit.c 2013/11/03 13:55:00 3.3 +++ ./eit.c 2014/02/08 12:33:01 @@ -220,7 +220,7 @@ case SI::LinkageDescriptorTag: { SI::LinkageDescriptor *ld = (SI::LinkageDescriptor *)d; tChannelID linkID(Source, ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); - if (ld->getLinkageType() == 0xB0) { // Premiere World + if (uint(ld->getLinkageType()) == 0xB0) { // Premiere World bool hit = StartTime <= Now && Now < StartTime + Duration; if (hit) { char linkName[ld->privateData.getLength() + 1]; =================================================================== RCS file: ./libsi/RCS/descriptor.h retrieving revision 3.1 diff -u -b -r3.1 ./libsi/descriptor.h --- ./libsi/descriptor.h 2013/10/30 10:16:18 3.1 +++ ./libsi/descriptor.h 2014/02/08 12:44:17 @@ -489,8 +489,6 @@ StructureLoop languageLoop; protected: virtual void Parse(); -private: - const descr_iso_639_language *s; }; class PDCDescriptor : public Descriptor { =================================================================== RCS file: ./RCS/menu.c retrieving revision 3.18 diff -u -b -r3.18 ./menu.c --- ./menu.c 2014/01/30 09:04:06 3.18 +++ ./menu.c 2014/02/08 12:36:12 @@ -983,7 +983,7 @@ if (!*data.file) strcpy(data.file, data.Channel()->ShortName(true)); if (timer) { - if (memcmp(timer, &data, sizeof(data)) != 0) + if (memcmp((void *)timer, &data, sizeof(data)) != 0) *timer = data; if (addIfConfirmed) Timers.Add(timer); =================================================================== RCS file: ./RCS/remux.h retrieving revision 3.2 diff -u -b -r3.2 ./remux.h --- ./remux.h 2014/01/28 11:06:37 3.2 +++ ./remux.h 2014/02/08 12:41:50 @@ -483,7 +483,6 @@ bool independentFrame; uint32_t ptsValues[MaxPtsValues]; // 32 bit is enough - we only need the delta int numPtsValues; - int numFrames; int numIFrames; bool isVideo; double framesPerSecond;