src/jtag/drivers/ep93xx: fix GCC 12 warning 80/7180/3
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 8 Sep 2022 12:37:55 +0000 (14:37 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Tue, 13 Sep 2022 22:16:07 +0000 (22:16 +0000)
commitb8594026e4bf1aa910944c0b72dd5f1def181f13
tree4689c30138ef2401f80067d689b6bddd8535fc78
parente5c103a8d31bddfbda2fd2583c1fcdcc0c818a94
src/jtag/drivers/ep93xx: fix GCC 12 warning

New GCC reports 5 warning:

src/jtag/drivers/ep93xx.c: In function 'set_gonk_mode':
src/jtag/drivers/ep93xx.c:123:47: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  123 |         devicecfg = *((volatile int *)(syscon + 0x80));
      |                                               ^
src/jtag/drivers/ep93xx.c:124:35: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  124 |         *((volatile int *)(syscon + 0xc0)) = 0xaa;
      |                                   ^
src/jtag/drivers/ep93xx.c:125:35: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  125 |         *((volatile int *)(syscon + 0x80)) = devicecfg | 0x08000000;
      |                                   ^
src/jtag/drivers/ep93xx.c: In function 'ep93xx_init':
src/jtag/drivers/ep93xx.c:182:46: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  182 |         gpio_data_register = gpio_controller + 0x08;
      |                                              ^
src/jtag/drivers/ep93xx.c:183:56: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  183 |         gpio_data_direction_register = gpio_controller + 0x18;
      |                                                        ^

Change pointer type to allow pointer arithmetic.

Change-Id: Idd78a7156bdf99df2624043e924b8e54a0588ace
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7180
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/drivers/ep93xx.c

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)