Bug #1471
closed
build error caused by commit 9c2cb6e00a line 63
Added by bas t over 12 years ago.
Updated over 12 years ago.
Found in version:
feature/timeshift
Description
line 63 (timeshift_max_size = 10000 * 1048576LL; // 10G) causes a build error:
/usr/src/tvheadend/src/timeshift.c: In function ‘timeshift_init’:
/usr/src/tvheadend/src/timeshift.c:63:3: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
cc1: all warnings being treated as errors
make: *** [build.linux/src/timeshift.o] Fout 1
When I just delete this line it will build ok
that is in src/timeshift.c
- Status changed from New to Need feedback
What platform is this? Can you try changing 1048576LL to 1048576uLL.
Adam
I'm on Debian Wheezy (aka testing)
Tried 1048576uLL but no luck. Still the same build error.
Having same issue on Ubuntu
After some googling I changed the line.
Now it builds ok.
I did:
timeshift_max_size = (unsigned char) 10000 * 1048576LL; // 10G
Does that make sense?
I think explicit casting may be the solution (though I need to check some stuff first), but you're casting to types that are too small. That will truncate the 10000 to 16.
Adam
- Status changed from Need feedback to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:9e8f9c13115b32d887cef0cb5cc3c3b9344136be.
Sorry, this causes another compile error:
CC build.linux/src/timeshift/timeshift_reader.o
/usr/src/tvheadend/src/timeshift/timeshift_reader.c: In function ‘timeshift_reader’:
/usr/src/tvheadend/src/timeshift/timeshift_reader.c:354:29: error: unused variable ‘skip’ [-Werror=unused-variable]
cc1: all warnings being treated as errors
make: *** [build.linux/src/timeshift/timeshift_reader.o] Fout 1
Also available in: Atom
PDF