Bug #1031
Make exits with error
0%
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
History
Updated by Rene Herbrich over 12 years ago
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; } }
Updated by Rene Herbrich over 12 years ago
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)
Updated by Hein Rigolo over 12 years ago
- 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
Updated by Rene Herbrich over 12 years ago
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?
Updated by Hein Rigolo over 12 years ago
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
Updated by Rene Herbrich over 12 years ago
yes, that commit helped - thanks!
Sure... But ehm, sorry for the stupid question: where do I have to put patch here: https://github.com/andoma/tvheadend?
Updated by Rene Herbrich over 12 years ago
- File synology.patch synology.patch added
Here's the patch for Synology NAS with Marvell Kirkwood mv6281/mv6282 CPU
Updated by Hein Rigolo over 12 years ago
- Status changed from New to Fixed
just create your own github account, clone the main tvheadend source and the add your patch
Updated by Andreas Smas over 12 years ago
- 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?
Updated by Rene Herbrich over 12 years ago
Not that much:
#ifndef _DVBVERSION_H_ #define _DVBVERSION_H_ #define DVB_API_VERSION 3 #define DVB_API_VERSION_MINOR 2 #endif /*_DVBVERSION_H_*/
Updated by Adam Sutton over 12 years ago
- 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.