You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2021/07/14 10:35:07 UTC
[mynewt-core] branch master updated: baselibc: Fix build with
-Werror=array-parameter enabled
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new d3ded77 baselibc: Fix build with -Werror=array-parameter enabled
d3ded77 is described below
commit d3ded778aec32af75ddfe716ab2a38e26bc9fc24
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Mon Jul 12 15:32:27 2021 +0200
baselibc: Fix build with -Werror=array-parameter enabled
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
---
libc/baselibc/include/stdlib.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/baselibc/include/stdlib.h b/libc/baselibc/include/stdlib.h
index 0abc783..d80a0f8 100644
--- a/libc/baselibc/include/stdlib.h
+++ b/libc/baselibc/include/stdlib.h
@@ -63,9 +63,9 @@ __extern void *bsearch(const void *, const void *, size_t, size_t,
__comparefunc_t);
__extern void qsort(void *, size_t, size_t, __comparefunc_t);
-__extern long jrand48(unsigned short *);
+__extern long jrand48(unsigned short xsubi[3]);
__extern long mrand48(void);
-__extern long nrand48(unsigned short *);
+__extern long nrand48(unsigned short xsubi[3]);
__extern long lrand48(void);
__extern unsigned short *seed48(const unsigned short *);
__extern void srand48(long);