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

esl-iter.h: fix type declaration of return value for gcc-13 #242

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Apr 26, 2023

Upcoming gcc-13 detected return type mismatch as:

esl-iter.c:84:1: error: conflicting types for 'esl_iter_next_with_size_correction' due to enum/integer mismatch; have 'esl_iter_status_t(esl_iter *, efi_guid_t *, efi_guid_t *, uint8_t **, size_t *, _Bool)' {aka 'enum esl_iter_status(esl_iter *, efi_guid_t *, efi_guid_t *, unsigned char **, long unsigned int *, _Bool)'} [-Werror=enum-int-mismatch]
   84 | esl_iter_next_with_size_correction(esl_iter *iter, efi_guid_t *type,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from efisec.h:25,
                 from esl-iter.c:7:
esl-iter.h:61:12: note: previous declaration of 'esl_iter_next_with_size_correction' with type 'int(esl_iter *, efi
*, efi_guid_t *, uint8_t **, size_t *, _Bool)' {aka 'int(esl_iter *, efi_guid_t *, efi_guid_t *, unsigned char **, long unsigned int *, _Bool)'}
   61 | extern int esl_iter_next_with_size_correction(esl_iter *iter, efi_guid_t *type,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The change brings declaration and definition in sync.

Upcoming `gcc-13` detected return type mismatch as:

    esl-iter.c:84:1: error: conflicting types for 'esl_iter_next_with_size_correction' due to enum/integer mismatch; have 'esl_iter_status_t(esl_iter *, efi_guid_t *, efi_guid_t *, uint8_t **, size_t *, _Bool)' {aka 'enum esl_iter_status(esl_iter *, efi_guid_t *, efi_guid_t *, unsigned char **, long unsigned int *, _Bool)'} [-Werror=enum-int-mismatch]
       84 | esl_iter_next_with_size_correction(esl_iter *iter, efi_guid_t *type,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from efisec.h:25,
                     from esl-iter.c:7:
    esl-iter.h:61:12: note: previous declaration of 'esl_iter_next_with_size_correction' with type 'int(esl_iter *, efi
    *, efi_guid_t *, uint8_t **, size_t *, _Bool)' {aka 'int(esl_iter *, efi_guid_t *, efi_guid_t *, unsigned char **, long unsigned int *, _Bool)'}
       61 | extern int esl_iter_next_with_size_correction(esl_iter *iter, efi_guid_t *type,
          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The change brings declaration and definition in sync.

Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
@vathpela vathpela merged commit 04caa26 into rhboot:main Jan 29, 2024
@trofi trofi deleted the gcc-13-fix branch January 29, 2024 23:21
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.

None yet

2 participants