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

Small fixes for signedness warnings in translation service #15873

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

zoltanvb
Copy link
Contributor

@zoltanvb zoltanvb commented Nov 5, 2023

Description

Current code throws some warnings during compilation:

tasks/task_translation.c: In function ‘parse_response_json’:
tasks/task_translation.c:603:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
  603 |          for (i = 0; i < ARRAY_SIZE(ACCESS_RESPONSE_KEYS) && key == -1; i++)
      |                        ^
tasks/task_translation.c: In function ‘translation_response_input’:
tasks/task_translation.c:1100:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
 1100 |             for (; i < ARRAY_SIZE(ACCESS_INPUT_LABELS) && !found; i++)
      |                      ^
tasks/task_translation.c: In function ‘translation_dupe_fail’:
tasks/task_translation.c:1318:46: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
 1318 |    bool size_equal            = (frame->size == access_st->last_image_size);
      |                                              ^~

Kind of trivial, except for the change in accessibility.h . Negative value for a size could indicate some error situation, but I found no usage for this in the code.

Reviewers

@xunkar @cpod12

@LibretroAdmin LibretroAdmin merged commit aaff36d into libretro:master Nov 5, 2023
22 checks passed
@zoltanvb zoltanvb deleted the translation_warningfix branch November 11, 2023 09:44
Sunderland93 pushed a commit to Sunderland93/RetroArch that referenced this pull request Dec 26, 2024
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