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

[MIRROR] Gets rid of UNIT_TESTS compiler warning #2973

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#2077
Original PR: tgstation/tgstation#82695

About The Pull Request

Basically every single CI Run is throwing the following warning:

code/modules/unit_tests/lootpanel.dm:24:warning (unused_var): new_box: variable defined but not used

You may find an example here: https://github.com/tgstation/tgstation/actions/runs/8698627681/job/23855921813#step:9:24

This is pretty silly but I don't really know why we even have this variable (I assume there's something far more complicated underneath the surface based on what the unit test is asserting), but assuming it is important let's just insert a do-nothing procedure to get rid of the compiler warning while ensuring the unit test is actually operating as it should.

I also don't really like the fact that this is a warning instead of an error but let's tackle this problem one step at a time by at least getting rid of the compiler warning in a quick advance PR while I dwell on this issue (is there a way to get the Dreamchecker linter to look at the unit test files? it's caught perfectly fine in the langserver)

* Gets rid of UNIT_TESTS compiler warning (#82695)

## About The Pull Request

Basically every single CI Run is throwing the following warning:
```txt
code/modules/unit_tests/lootpanel.dm:24:warning (unused_var): new_box: variable defined but not used
```

You may find an example here:
https://github.com/tgstation/tgstation/actions/runs/8698627681/job/23855921813#step:9:24

This is pretty silly but I don't really know why we even have this
variable (I assume there's something far more complicated underneath the
surface based on what the unit test is asserting), but assuming it is
important let's just insert a do-nothing procedure to get rid of the
compiler warning while ensuring the unit test is actually operating as
it should.

I also don't really like the fact that this is a warning instead of an
error but let's tackle this problem one step at a time by at least
getting rid of the compiler warning in a quick advance PR while I dwell
on this issue (is there a way to get the Dreamchecker linter to look at
the unit test files? it's caught perfectly fine in the langserver)

---------

Co-authored-by: MrMelbert <[email protected]>

* Gets rid of UNIT_TESTS compiler warning

---------

Co-authored-by: san7890 <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
@ReezeBL ReezeBL merged commit f368add into master Apr 19, 2024
27 checks passed
@ReezeBL ReezeBL deleted the upstream-mirror-2077 branch April 19, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants