jpoet / HauppaugeUSB

MythTV wrapper around the Hauppauge HD-PVR2/Colossus2 driver
GNU General Public License v3.0
16 stars 5 forks source link

Build system does not honour preset `CFLAGS` and `CXXFLAGS` error silencing switches. #35

Closed dreirund closed 2 months ago

dreirund commented 2 months ago

Althoug I have added to my $CFLAGS and $CXXFLAGS environment variable

-Wno-unused-but-set-variable -Wno-unused-variable -Wno-reorder -Wno-unused-function -Wno-comment -Wno-stringop-truncation -Wno-array-bounds -Wno-misleading-indentation -Wno-sign-compare -Wno-unused-value -Wno-switch

make does still print out those compiler warnings:

[...]
./Hauppauge/Common/FX2API/FX2Device.cpp:109:78: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  109 |         if(sendCommand(wrbuf, 4 + outlen, rdbuf, 1 + inlen, DEFAULT_TIMEOUT) != (1 + inlen)) {
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
./Hauppauge/Common/FX2API/FX2Device.cpp:98:13: warning: unused variable ‘ret’ [-Wunused-variable]
   98 |         int ret;
      |             ^~~
./Hauppauge/Common/FX2API/FX2Device.cpp: In member function ‘bool FX2Device_t::I2CRead(uint8_t, uint8_t*, size_t)’:
./Hauppauge/Common/FX2API/FX2Device.cpp:131:69: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  131 |         if(sendCommand(wrbuf, 4, rdbuf, 1 + inlen, DEFAULT_TIMEOUT) != (1 + inlen)) {
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
./Hauppauge/Common/FX2API/FX2Device.cpp:122:13: warning: unused variable ‘ret’ [-Wunused-variable]
  122 |         int ret;
      |             ^~~
[...]

Please make that the build completely honours pre-set CFLAGS and CXXFLAGS (you can append your own if really needed),
and please update the code to be compatible with up to date GCC so that those warnings go away, if possible.

GCC version: 14.1.1

jpoet commented 2 months ago

Sorry, but I no longer have one of these devices.

This repository is just a wrapper around the code from Hauppauge. Maybe if you can get Hauppauge to update their code that would resolve this issue.

I am going to close this until someone steps forward to take over this project.