Project

General

Profile

Bug #1471

build error caused by commit 9c2cb6e00a line 63

Added by bas t almost 12 years ago. Updated almost 12 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

History

#1

Updated by bas t almost 12 years ago

that is in src/timeshift.c

#2

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

#3

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.

#4

Updated by Heine Madsen almost 12 years ago

Having same issue on Ubuntu

#5

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?

#6

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

#7

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.

#8

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

Also available in: Atom PDF