Bug #1471
build error caused by commit 9c2cb6e00a line 63
100%
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
History
Updated by Adam Sutton almost 12 years ago
- Status changed from New to Need feedback
What platform is this? Can you try changing 1048576LL to 1048576uLL.
Adam
Updated by bas t almost 12 years ago
I'm on Debian Wheezy (aka testing)
Tried 1048576uLL but no luck. Still the same build error.
Updated by bas t almost 12 years ago
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?
Updated by Adam Sutton almost 12 years ago
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
Updated by Adam Sutton almost 12 years ago
- Status changed from Need feedback to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:9e8f9c13115b32d887cef0cb5cc3c3b9344136be.
Updated by bas t almost 12 years ago
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
Updated by bas t almost 12 years ago
Updated by bas t almost 12 years ago
bas t wrote:
Fixed in https://github.com/tvheadend/tvheadend/commit/f005cbc8b4ff3d3ce138fb5f1cfa46f7c416133e
Thanks.
That is incorrect, it should be: https://github.com/tvheadend/tvheadend/commit/9e8f9c13115b32d887cef0cb5cc3c3b9344136be