Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tbsecp3: fix compiler warnings #299

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from

Conversation

alanswanson
Copy link

The bitwise comparisons checking for mcu busy on bit 2 always evaluated false.

The tbsecp3 directory now only warns for one unused variable and two unused functions in tbsecp3-dbc.c which left for now.

…ings

From -Wtautological-compare in GCC. Masking a value and comparing to one
will only work if the mask itself is equal to one (which is not the case
here). Comparing to zero works for any mask.
From -Wmisleading-indentation in GCC.

drivers/media/pci/tbsecp3/tbsecp3-dvb.c: In function ‘tbsecp3_frontend_attach’:
drivers/media/pci/tbsecp3/tbsecp3-dvb.c:1487:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
 1487 |                 if (adapter->fe == NULL)
      |                 ^~
drivers/media/pci/tbsecp3/tbsecp3-dvb.c:1489:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1489 |                     if(adapter->nr <4)
      |                     ^~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant