Skip to contentSkip to conversation

lib: rsa: struct udevice build warning

PATCH New Heinrich Schuchardt 3 participants 3 messages Feb 17, 2021 – Feb 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: rsa: struct udevice build warning

Avoid build warnings observed with gcc 10.2

In file included from lib/rsa/rsa-keyprop.c:16:
include/u-boot/rsa-mod-exp.h:65:24: warning:
?struct udevice? declared inside parameter list will not be visible outside of this definition or declaration

   65 | int rsa_mod_exp(struct udevice *dev, const uint8_t *sig,
      | uint32_t sig_len,
      |                        ^~~~~~~

include/u-boot/rsa-mod-exp.h:96:24: warning:
?struct udevice? declared inside parameter list will not be visible outside of this definition or declaration
96 | int (*mod_exp)(struct udevice *dev, const uint8_t *sig,

      |

by defining struct udevice.

Fixes 401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
---
 include/u-boot/rsa-mod-exp.h | 2 ++
 1 file changed, 2 insertions(+)
include/u-boot/rsa-mod-exp.h +2 -0
index 7b7c2915a9..fc9557c781 100644
@@ -9,6 +9,8 @@
 #include <errno.h>
 #include <image.h>
 
+struct udevice;
+
 /**
  * struct key_prop - holder for a public key properties
  *

--
2.30.0

#1 lore raw

PATCH 1/1 lib: rsa: struct udevice build warning

Quoted 16 lines · Heinrich Schuchardt

Avoid build warnings observed with gcc 10.2

In file included from lib/rsa/rsa-keyprop.c:16:
include/u-boot/rsa-mod-exp.h:65:24: warning:
?struct udevice? declared inside parameter list will not be visible outside of this definition or declaration

   65 | int rsa_mod_exp(struct udevice *dev, const uint8_t *sig,
      | uint32_t sig_len,
      |                        ^~~~~~~

include/u-boot/rsa-mod-exp.h:96:24: warning:
?struct udevice? declared inside parameter list will not be visible outside of this definition or declaration
96 | int (*mod_exp)(struct udevice *dev, const uint8_t *sig,

      |
Quoted 8 lines

by defining struct udevice.

Fixes 401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
---
 include/u-boot/rsa-mod-exp.h | 2 ++
 1 file changed, 2 insertions(+)
#2 lore raw

PATCH 1/1 lib: rsa: struct udevice build warning

In reply to Heinrich Schuchardt
Quoted 13 lines · Heinrich Schuchardt

Avoid build warnings observed with gcc 10.2

In file included from lib/rsa/rsa-keyprop.c:16:
include/u-boot/rsa-mod-exp.h:65:24: warning:
?struct udevice? declared inside parameter list will not be visible outside of this definition or declaration

   65 | int rsa_mod_exp(struct udevice *dev, const uint8_t *sig,
      | uint32_t sig_len,
      |                        ^~~~~~~

include/u-boot/rsa-mod-exp.h:96:24: warning:
?struct udevice? declared inside parameter list will not be visible outside of this definition or declaration
96 | int (*mod_exp)(struct udevice *dev, const uint8_t *sig,

Quoted 7 lines
      |

by defining struct udevice.

Fixes 401d1c4f5d2d ("common: Drop asm/global_data.h from common header")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210225/32eab895/attachment.sig>