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

baselibc: Fix build with -Werror=array-parameter enabled #2640

Merged
merged 1 commit into from Jul 14, 2021

Conversation

sjanc
Copy link
Contributor

@sjanc sjanc commented Jul 12, 2021

repos/apache-mynewt-core/libc/baselibc/src/jrand48.c:8:29: error: argument 1 of type
‘short unsigned int[3]’ with mismatched bound [-Werror=array-parameter=]
8 | long jrand48(unsigned short xsubi[3])
| ~~~~~~~~~~~~~~~^~~~~~~~
In file included from repos/apache-mynewt-core/libc/baselibc/src/jrand48.c:5:
repos/apache-mynewt-core/libc/baselibc/include/stdlib.h:66:23: note: previously declared
as ‘short unsigned int *’
66 | __extern long jrand48(unsigned short *);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

repos/apache-mynewt-core/libc/baselibc/src/jrand48.c:8:29: error: argument 1 of type
    ‘short unsigned int[3]’ with mismatched bound [-Werror=array-parameter=]
    8 | long jrand48(unsigned short xsubi[3])
      |              ~~~~~~~~~~~~~~~^~~~~~~~
In file included from repos/apache-mynewt-core/libc/baselibc/src/jrand48.c:5:
repos/apache-mynewt-core/libc/baselibc/include/stdlib.h:66:23: note: previously declared
    as ‘short unsigned int *’
   66 | __extern long jrand48(unsigned short *);
      |                       ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Copy link
Contributor

@mlaz mlaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@utzig utzig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the option is enabled by default on gcc 11.

@utzig utzig merged commit d3ded77 into apache:master Jul 14, 2021
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

3 participants