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

unit test 1655: make it C89-compliant #9551

Closed
wants to merge 1 commit into from
Closed

Conversation

monnerat
Copy link
Contributor

@monnerat monnerat commented Sep 21, 2022

Initializations performed in unit test 1655 use automatic variables in aggregates and thus can only be computed at run-time. Using gcc in C89 dialect mode produces warning messages like:

unit1655.c:96:7: warning: initializer element is not computable at load time [-Wpedantic]
   96 |     { toolong, DOH_DNS_NAME_TOO_LONG },  /* expect early failure */
      |       ^~~~~~~

Fix the problem by converting these automatic pointer variables to static arrays.

Initializations performed in unit test 1655 use automatic variables in
aggregates and thus can only be computed at run-time. Using gcc in C89
dialect mode produces warning messages like:

unit1655.c:96:7: warning: initializer element is not computable at load time [-Wpedantic]
   96 |     { toolong, DOH_DNS_NAME_TOO_LONG },  /* expect early failure */
      |       ^~~~~~~

Fix the problem by converting these automatic pointer variables to
static arrays.
@bagder
Copy link
Member

bagder commented Sep 21, 2022

Thanks!

@bagder bagder closed this in 6fbf7d3 Sep 21, 2022
@monnerat monnerat deleted the c89-1655 branch September 21, 2022 08:01
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