]> git.sur5r.net Git - openocd/commit - src/target/cortex_a.c
target/cortex_a: fix compile error for uninitialized variable
authorPaul Bartholomew <oz_paulb@users.sourceforge.net>
Wed, 25 Jul 2018 20:59:01 +0000 (22:59 +0200)
committerMatthias Welwarsky <matthias@welwarsky.de>
Fri, 27 Jul 2018 13:12:08 +0000 (14:12 +0100)
commit4896c83ce8f28674a0beb34e7d475cb5b0ac7dab
treee5043563e7e2f3d475c02a8296c5444031f8c1bd
parent11e3b6fb09f06f730e5591c6099d4bbc193ff312
target/cortex_a: fix compile error for uninitialized variable

Commit ad6c71e151590f9d07eb07eda978a8d2a845259c introduced the
variable "mmu_enabled" whose pointer is passed to cortex_a_mmu()
that initialises it.
This initialization is not visible to the compiler that issue
a compile error.
The same situation is common across the same file and the usual
workaround is to initialize it to zero; thus the same fix i
applied here.

Ticket: https://sourceforge.net/p/openocd/tickets/197/
Fixes: commit ad6c71e15159 ("cortex_a: fix virt2phys when mmu is disabled")
Change-Id: I77dec41acdf4c715b45ae37b72e36719d96d9283
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4619
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
src/target/cortex_a.c