zynq: disable -Wstrict-prototypes option for ps7_init.c
PATCH v2 1/1 zynq: disable -Wstrict-prototypes option for ps7_init.c
The files ps7_init.c and ps7_init.h are supposed to be generated by hw projects such as Vivado, PlanAhead and then to be copied into board/xilinx/zynq directory.
But some prototypes in them cause annoying warning messages:
CC spl/board/xilinx/zynq/ps7_init.o
In file included from board/xilinx/zynq/ps7_init.c:50:0:board/xilinx/zynq/ps7_init.h:137:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.h:138:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.h:139:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.h:145:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.c:12602:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.c:12723:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.c:12742:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.c:12761:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] board/xilinx/zynq/ps7_init.c:12854:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]
The prototypes should be
int ps7_init(void); int ps7_post_config(void); int ps7_debug(void);
rather than
int ps7_init(); int ps7_post_config(); int ps7_debug();
We do not want to be bothered because of automatically generated files. But we cannot touch the external projects for now.
What we can do is to disable -Wstrict-prototypes for ps7_init.c
---
Changes in v2:
No change in code. Some changes in git-log
- Fix a typo: s/causes/cause/
- Add Tested-by credit
board/xilinx/zynq/Makefile | 3 +++ 1 file changed, 3 insertions(+)
board/xilinx/zynq/Makefile +3 -0
@@ -10,3 +10,6 @@ obj-y := board.o # Please copy ps7_init.c/h from hw project to this directory obj-$(CONFIG_SPL_BUILD) += \ $(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o) + +# Suppress "warning: function declaration isn't a prototype" +CFLAGS_REMOVE_ps7_init.o := -Wstrict-prototypes
Signature · 1 line
1.9.1
PATCH v2 1/1 zynq: disable -Wstrict-prototypes option for ps7_init.c
Hi Michal,
Could you apply this one along with your other zynq patches ?
And please clean-up noise on patchwork.
http://patchwork.ozlabs.org/patch/347047/
http://patchwork.ozlabs.org/patch/355816/
Thanks,
Masahiro Yamada
Quoted 60 lines · On Thu, 29 May 2014 14:46:13 +0900 Masahiro Yamada <[email protected]>…
The files
ps7_init.candps7_init.hare supposed to be generated by hw projects such as Vivado, PlanAhead and then to be copied into board/xilinx/zynq directory.But some prototypes in them cause annoying warning messages:
CC
spl/board/xilinx/zynq/ps7_init.o
In file included fromboard/xilinx/zynq/ps7_init.c:50:0:board/xilinx/zynq/ps7_init.h:137:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.h:138:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.h:139:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.h:145:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.c:12602:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.c:12723:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.c:12742:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.c:12761:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]board/xilinx/zynq/ps7_init.c:12854:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]The prototypes should be
int ps7_init(void); int ps7_post_config(void); int ps7_debug(void);rather than
int ps7_init(); int ps7_post_config(); int ps7_debug();We do not want to be bothered because of automatically generated files. But we cannot touch the external projects for now.
What we can do is to disable -Wstrict-prototypes forps7_init.cSigned-off-by Masahiro Yamada <[email protected]>Cc Michal Simek <[email protected]>Tested-by Michal Simek <[email protected]>---
Changes in v2:
No change in code. Some changes in git-log
- Fix a typo: s/causes/cause/
- Add Tested-by creditboard/xilinx/zynq/Makefile | 3 +++ 1 file changed, 3 insertions(+)board/xilinx/zynq/Makefile +3
-0@@ -10,3 +10,6 @@ obj-y := board.o # Please copy ps7_init.c/h from hw project to this directory obj-$(CONFIG_SPL_BUILD) += \ $(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o) + +# Suppress "warning: function declaration isn't a prototype" +CFLAGS_REMOVE_ps7_init.o := -Wstrict-prototypesSignature · 1 line
1.9.1
PATCH v2 1/1 zynq: disable -Wstrict-prototypes option for ps7_init.c
Hi Masahiro,
Quoted 10 lines · Masahiro Yamada
Hi Michal,
Could you apply this one along with your other zynq patches ?
And please clean-up noise on patchwork.
http://patchwork.ozlabs.org/patch/347047/
http://patchwork.ozlabs.org/patch/355816/
I have clean status on these one + fpga patches which have been applied.
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140723/bc5f9343/attachment.pgp>