Project

General

Profile

Bug #5657

recent capmt introduced a compilation error

Added by Pim Zandbergen 6 months ago. Updated 6 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Descrambling
Target version:
-
Start date:
2019-06-13
Due date:
% Done:

100%

Estimated time:
Found in version:
bc769bfa9260bad6e1caa0c95591b70ae25f47bf
Affected Versions:

Description

commit bc769bf introdueced a compilation error when compiling on Fedora 30

CC              src/descrambler/capmt.o
In file included from src/tvheadend.h:39,
                 from src/descrambler/capmt.c:24:
In function ‘capmt_analyze_cmd’,
    inlined from ‘handle_single’ at src/descrambler/capmt.c:1765:9:
src/tvhlog.h:206:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  206 |   _tvhlog(__FILE__, __LINE__, severity | LOG_TVH_NOTIFY, subsys, fmt, ##__VA_ARGS__)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tvhlog.h:235:24: note: in expansion of macro ‘tvhlog’
  235 | #define tvhinfo(...)   tvhlog(LOG_INFO,    ##__VA_ARGS__)
      |                        ^~~~~~
src/descrambler/capmt.c:1514:5: note: in expansion of macro ‘tvhinfo’
 1514 |     tvhinfo(LS_CAPMT, "%s: Connected to server '%s' (protocol version %d)", capmt_name(capmt), info, protover);
      |     ^~~~~~~
src/descrambler/capmt.c: In function ‘handle_single’:
src/descrambler/capmt.c:1514:49: note: format string is defined here
 1514 |     tvhinfo(LS_CAPMT, "%s: Connected to server '%s' (protocol version %d)", capmt_name(capmt), info, protover);
      |                                                 ^~
cc1: all warnings being treated as errors

Associated revisions

Revision 5e555760 (diff)
Added by Jaroslav Kysela 6 months ago

capmt: fix compilation with recent gcc, fixes #5657

Revision 4036e249 (diff)
Added by Jaroslav Kysela 6 months ago

capmt: fix compilation with recent gcc, fixes #5657

History

#1

Updated by matias segurola 6 months ago

Pim Zandbergen wrote:

commit bc769bf introdueced a compilation error when compiling on Fedora 30

[...]

it is not an error of oscam nor anything oscam was modified and collided with the code of tvheadend that says that for better work tvheadend would have to modify its small error that in the past was very helpful

#2

Updated by Pim Zandbergen 6 months ago

No of course this has nothing to do with oscam.
It's a compilation error that prevents tvh from being built so it never gets to connect to oscam...

I just wonder why no one else is seeing this.
Maybe it is gcc version specific? Fedora 30 uses gcc 9.1.1

I don't really understand the error message, as the line gcc complains about itself has not changed,
and the arguments are function results that cannot be known at compile time.

#3

Updated by Jaroslav Kysela 6 months ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100
#4

Updated by saen acro 6 months ago

Ubuntu 16.04 x86

CC              timestamp.o
src/descrambler/capmt.c: In function ‘capmt_analyze_cmd’:
src/descrambler/capmt.c:1511:18: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     char *info        = capmt_peek_str(sb, &offset2) ?: "<unknown>";
                  ^
src/descrambler/capmt.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-stringop-overflow’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-stringop-truncation’ [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [/opt/tvheadend/build.linux/src/descrambler/capmt.o] Error 1
Makefile:713: recipe for target '/opt/tvheadend/build.linux/src/descrambler/capmt.o' failed
make[2]: Leaving directory '/opt/tvheadend'
make[1]: *** [override_dh_auto_build] Error 2
debian/rules:15: recipe for target 'override_dh_auto_build' failed
make[1]: Leaving directory '/opt/tvheadend'
make: *** [build] Error 2
debian/rules:6: recipe for target 'build' failed
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Also available in: Atom PDF