Skip to content

Fix: remove unused variables - #145

Merged
Yamagi merged 1 commit into
yquake2:masterfrom
amalchuk:feature/fix-unused-but-set-variable
Jun 4, 2026
Merged

Yamagi merged 1 commit into
yquake2:masterfrom
amalchuk:feature/fix-unused-but-set-variable

Conversation

@amalchuk

@amalchuk amalchuk commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

When make is processing, I've got a warnings such as:

src/g_newai.c:424:6: warning: variable 'count1' set but not used [-Wunused-but-set-variable]
  424 |         int count1 = 0, count2 = 0, count4 = 0, count5 = 0;
      |             ^
src/g_newai.c:424:18: warning: variable 'count2' set but not used [-Wunused-but-set-variable]
  424 |         int count1 = 0, count2 = 0, count4 = 0, count5 = 0;
      |                         ^
src/g_newai.c:424:30: warning: variable 'count4' set but not used [-Wunused-but-set-variable]
  424 |         int count1 = 0, count2 = 0, count4 = 0, count5 = 0;
      |                                     ^
src/g_newai.c:918:16: warning: variable 'count2' set but not used [-Wunused-but-set-variable]
  918 |         int field, i, count2;
      |                       ^
src/g_spawn.c:307:9: warning: variable 'c2' set but not used [-Wunused-but-set-variable]
  307 |         int c, c2;
      |                ^

I have removed these unused variables. Tested on macOS 15, it just works fine.

@Yamagi

Yamagi commented Jun 4, 2026

Copy link
Copy Markdown
Member

Thank you!

@Yamagi
Yamagi merged commit 141ef78 into yquake2:master Jun 4, 2026
9 checks passed
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