Project

General

Profile

Actions

Bug #1471

closed

build error caused by commit 9c2cb6e00a line 63

Bug #1471: build error caused by commit 9c2cb6e00a line 63

Added by bas t over 13 years ago. Updated over 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-12-25
Due date:
% Done:

100%

Estimated time:
Found in version:
feature/timeshift
Affected Versions:

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

Updated by bas t over 13 years ago Actions #1

that is in src/timeshift.c

Updated by Adam Sutton over 13 years ago Actions #2

  • Status changed from New to Need feedback

What platform is this? Can you try changing 1048576LL to 1048576uLL.

Adam

Updated by bas t over 13 years ago Actions #3

I'm on Debian Wheezy (aka testing)

Tried 1048576uLL but no luck. Still the same build error.

Updated by Heine Madsen over 13 years ago Actions #4

Having same issue on Ubuntu

Updated by bas t over 13 years ago Actions #5

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 over 13 years ago Actions #6

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 over 13 years ago Actions #7

  • Status changed from Need feedback to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:9e8f9c13115b32d887cef0cb5cc3c3b9344136be.

Updated by bas t over 13 years ago Actions #8

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

Actions

Also available in: PDF Atom