Skip to content

fix(linux/capture): fix logical comparison of texture size#2349

Merged
ReenigneArcher merged 2 commits intoLizardByte:nightlyfrom
istori1:patch-6
Apr 6, 2024
Merged

fix(linux/capture): fix logical comparison of texture size#2349
ReenigneArcher merged 2 commits intoLizardByte:nightlyfrom
istori1:patch-6

Conversation

@istori1
Copy link
Copy Markdown
Contributor

@istori1 istori1 commented Apr 1, 2024

Description

Compiler warning

/run/build/sunshine/src/platform/linux/graphics.cpp:40:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
   40 |     if (!size() == 0) {
      |         ^       ~~
/run/build/sunshine/src/platform/linux/graphics.cpp:40:9: note: add parentheses after the '!' to evaluate the comparison first
   40 |     if (!size() == 0) {
      |         ^           
      |          (          )
/run/build/sunshine/src/platform/linux/graphics.cpp:40:9: note: add parentheses around left hand side expression to silence this warning
   40 |     if (!size() == 0) {
      |         ^
      |         (      )
1 warning generated.

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher
Copy link
Copy Markdown
Member

What compiler are you using?

@istori1
Copy link
Copy Markdown
Contributor Author

istori1 commented Apr 1, 2024

Clang++ 17

There are other warnings produced. This one looks very easy to solve.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 6.49%. Comparing base (b7aa811) to head (724bebf).

Additional details and impacted files
@@           Coverage Diff           @@
##           nightly   #2349   +/-   ##
=======================================
  Coverage     6.49%   6.49%           
=======================================
  Files           85      85           
  Lines        18384   18384           
  Branches      8348    8348           
=======================================
  Hits          1194    1194           
  Misses       16149   16149           
  Partials      1041    1041           
Flag Coverage Δ
Linux 4.43% <0.00%> (ø)
Windows 2.01% <ø> (ø)
macOS-12 8.72% <ø> (+0.01%) ⬆️
macOS-13 8.07% <ø> (+0.01%) ⬆️
macOS-14 8.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/platform/linux/graphics.cpp 1.13% <0.00%> (ø)

@istori1 istori1 marked this pull request as ready for review April 5, 2024 21:43
istori1 and others added 2 commits April 6, 2024 16:52
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
@ReenigneArcher ReenigneArcher changed the title Fix compiler warning fix(linux/capture): fix logical comparison of texture size Apr 6, 2024
@ReenigneArcher ReenigneArcher added this to the v0.23.0 milestone Apr 6, 2024
@ReenigneArcher ReenigneArcher merged commit 7f795f0 into LizardByte:nightly Apr 6, 2024
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
…e#2349)

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
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.

2 participants