Bug #1031
closed
Added by Rene Herbrich almost 13 years ago.
Updated over 12 years ago.
Found in version:
8f9ac9040e
Description
cc1: warnings being treated as errors
/opt/src/tvheadend/src/dvb/dvb_support.c: In function 'encode_utf8':
/opt/src/tvheadend/src/dvb/dvb_support.c:53: warning: comparison is always true due to limited range of data type
/opt/src/tvheadend/src/dvb/dvb_support.c:58: warning: comparison is always true due to limited range of data type
make: *** [build.linux/src/dvb/dvb_support.o] Error 1
I'm using a Synology NAS with a Marvell Kirkwood mv6281 CPU (it's cpu related, isn't it?)
Files
static inline int encode_utf8(uint16_t c, char *outb, int outleft)
{
if (c <= 0x7F && outleft >= 1) {
*outb = c;
return 1;
} else if (c <= 0x7FF && outleft >=2) {
*outb++ = ((c >> 6) & 0x1F) | 0xC0;
*outb++ = ( c & 0x3F) | 0x80;
return 2;
} else if (c <= 0xFFFF && outleft >= 3) { <== Line 53
*outb++ = ((c >> 12) & 0x0F) | 0xE0;
*outb++ = ((c >> 6) & 0x3F) | 0x80;
*outb++ = ( c & 0x3F) | 0x80;
return 3;
} else if (c <= 0x10FFFF && outleft >= 4) { <== Line 58
*outb++ = ((c >> 18) & 0x07) | 0xF0;
*outb++ = ((c >> 12) & 0x3F) | 0x80;
*outb++ = ((c >> 6) & 0x3F) | 0x80;
*outb++ = ( c & 0x3F) | 0x80;
return 4;
} else {
return -1;
}
}
ok, I disabled the "werror" compiler flag, but there's another error:
CC build.linux/src/dvb/dvb_preconf.o
/opt/src/tvheadend/src/dvb/dvb_preconf.c: In function 'dvb_mux_preconf_add':
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: 'struct dvb_mux_conf' has no member named 'dmc_fe_delsys'
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: 'SYS_DVBS' undeclared (first use in this function)
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: (Each undeclared identifier is reported only once
/opt/src/tvheadend/src/dvb/dvb_preconf.c:67: error: for each function it appears in.)
make: *** [build.linux/src/dvb/dvb_preconf.o] Error 1
that commit is breaking the code: https://github.com/andoma/tvheadend/commit/4ca5dda14a0e4fc7a78886e7a73058be96e3dad2
if I revert that commit, the code is compiling fine (except the warnings above)
- Category changed from DVB to non-x86
the first warning is related (if I am correct) to a change that is done to remove the dependency on iconv/gconv. But it might be that it does not work correctly on your architecture/cpu.
The second part is related to a change in the kernel dvb modules. If you get this error then I suspect you have an old kernel (which version?)
Hein
It's 2.6.32.6
Not the newest, I know. But I'm using the latest firmware by Synology.
Is there anything you can do about that?
Maybe a switch for older kernel versions?
Are there any consequences, if I ignore the warnings?
there has been a commit (commit:7d31b784) this morning that could solve your first compile warning. Can you check to see it that first warning is now gone?
If we need to add switches to the code for all variations and kernels then it becomes unreadable. So I would suggest that you maintain a set of patches that needs to be applied to the main branch in order to compile tvheadend on your specific hardware. And I would suggest to maintain them on github so that other people can also see/use them.
Hein
Here's the patch for Synology NAS with Marvell Kirkwood mv6281/mv6282 CPU
- Status changed from New to Fixed
just create your own github account, clone the main tvheadend source and the add your patch
- Status changed from Fixed to Need feedback
Rene: Can you attach /usr/include/linux/dvb/version.h from your system so I can look at that?
- Assignee changed from Hein Rigolo to Rene Herbrich
Not that much:
#ifndef _DVBVERSION_H_
#define _DVBVERSION_H_
#define DVB_API_VERSION 3
#define DVB_API_VERSION_MINOR 2
#endif /*_DVBVERSION_H_*/
- Status changed from Need feedback to Fixed
I think this should be fixed now, with mod to latest source.
Rene, if its still a problem give me a shout.
Also available in: Atom
PDF