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

test #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

test #32

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ jobs:

steps:
- name: Check annotations
uses: OpenTTD/actions/annotation-check@v5
uses: glx22/actions/annotation-check@annotation_check
1 change: 1 addition & 0 deletions src/script/api/script_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
auto skip_args = [&](size_t nb) { idx += nb; };

for (const StringParam &cur_param : params) {
int i = 0;

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Emscripten / CI

unused variable 'i' [-Wunused-variable]

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Linux (Clang) / CI

unused variable 'i' [-Wunused-variable]

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Linux (GCC - Dedicated) / CI

unused variable ‘i’ [-Wunused-variable]

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Linux (GCC - SDL2) / CI

unused variable ‘i’ [-Wunused-variable]

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Mac OS (arm64 - Debug) / CI

unused variable 'i' [-Wunused-variable]

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Mac OS (arm64 - Release) / CI

unused variable 'i' [-Wunused-variable]

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Windows (x64) / CI

'i': local variable is initialized but not referenced

Check warning on line 235 in src/script/api/script_text.cpp

View workflow job for this annotation

GitHub Actions / Windows (x86) / CI

'i': local variable is initialized but not referenced

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable i is not used.
try {
switch (cur_param.type) {
case StringParam::UNUSED:
Expand Down Expand Up @@ -263,14 +264,14 @@
if (++count != cur_param.consumes) {
ScriptLog::Warning(fmt::format("{}({}): {{{}}} expects {} to be consumed, but {} consumes {}", name, param_count + 1, cur_param.cmd, cur_param.consumes - 1, GetGameStringName(ref->string), count - 1));
/* Fill missing params if needed. */
for (int i = count; i < cur_param.consumes; i++) fmt::format_to(output, ":0");

Check notice

Code scanning / CodeQL

Declaration hides variable Note

Variable i hides another variable of the same name (on
line 235
).
}
skip_args(cur_param.consumes - 1);
break;
}

default:
for (int i = 0; i < cur_param.consumes; i++) {

Check notice

Code scanning / CodeQL

Declaration hides variable Note

Variable i hides another variable of the same name (on
line 235
).
ParamCheck &p = *get_next_arg();
p.Encode(output, i == 0 ? cur_param.cmd : nullptr);
if (i == 0 && p.cmd != cur_param.cmd) throw 1;
Expand Down
Loading