Skip to contentSkip to conversation

common: bootchooser: Fix compile warning

PATCH In review Teresa Remmet 2 participants 2 messages Apr 8, 2019 – Apr 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: bootchooser: Fix compile warning

Make bootchooser_get_target() static to prevent following warning:

common/bootchooser.c:633:28: warning: no previous prototype for
‘bootchooser_get_target’ [-Wmissing-prototypes]
struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)

---
 common/bootchooser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/bootchooser.c +1 -1
index c47c734c9c7a..c08db03ebaa1 100644
@@ -630,7 +630,7 @@ void bootchooser_info(struct bootchooser *bc)
  *
  * Return: The next target
  */
-struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)
+static struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)
 {
 	struct bootchooser_target *target;
 
Signature · 7 lines
2.7.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 8 lines · Teresa Remmet

Make bootchooser_get_target() static to prevent following warning:

common/bootchooser.c:633:28: warning: no previous prototype for
‘bootchooser_get_target’ [-Wmissing-prototypes]
struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)

---

Already fixed with 27166fb0b1 ("treewide: Make locally used functions static")

Sascha

Quoted 24 lines
 common/bootchooser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/bootchooser.c +1 -1
index c47c734c9c7a..c08db03ebaa1 100644
@@ -630,7 +630,7 @@ void bootchooser_info(struct bootchooser *bc)
  *
  * Return: The next target
  */
-struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)
+static struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)
 {
 	struct bootchooser_target *target;
 
Signature · 7 lines
2.7.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox