Skip to contentSkip to conversation

fix "no previous prototype" warnings

PATCH Applied Antony Pavlov 2 participants 5 messages Mar 20, 2017 Common clk

lore
Share & tools
lore
#0 lore raw

cover fix "no previous prototype" warnings

Antony Pavlov (3):
gui: bmp.c: fix "no previous prototype" warning
clk: clk-gate-shared: fix "no previous prototype" warning
gui: image_renderer: fix "no previous prototype for
'image_renderer_unregister'" warning

 drivers/clk/clk-gate-shared.c | 6 +++---
 include/gui/image_renderer.h  | 2 +-
 lib/gui/bmp.c                 | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
Signature · 7 lines
2.11.0


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

PATCH 1/3 gui: bmp.c: fix "no previous prototype" warning

The patch fixes these compiler's warnings:

lib/gui/bmp.c:12:15: warning: no previous prototype for 'bmp_open' [-Wmissing-prototypes]
struct image *bmp_open(char *inbuf, int insize)

                 ^
  lib/gui/bmp.c:33:6: warning: no previous prototype for 'bmp_close' [-Wmissing-prototypes]
   void bmp_close(struct image *img)
        ^
---
 lib/gui/bmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/gui/bmp.c +2 -2
index 143aa2805..8bffc70a4 100644
@@ -9,7 +9,7 @@
 #include <gui/image_renderer.h>
 #include <asm/unaligned.h>
 
-struct image *bmp_open(char *inbuf, int insize)
+static struct image *bmp_open(char *inbuf, int insize)
 {
 	struct image *img = calloc(1, sizeof(struct image));
 	struct bmp_image *bmp = (struct bmp_image*)inbuf;
@@ -30,7 +30,7 @@ struct image *bmp_open(char *inbuf, int insize)
 	return img;
 }
 
-void bmp_close(struct image *img)
+static void bmp_close(struct image *img)
 {
 	free(img->data);
 }
Signature · 7 lines
2.11.0


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

PATCH 2/3 clk: clk-gate-shared: fix "no previous prototype" warning

In reply to Antony Pavlov

The patch fixes these compiler's warnings:

drivers/clk/clk-gate-shared.c:72:13: warning: no previous prototype for 'clk_gate_shared_alloc' [-Wmissing-prototypes]
struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const char *companion,

               ^
  drivers/clk/clk-gate-shared.c:89:6: warning: no previous prototype for 'clk_gate_shared_free' [-Wmissing-prototypes]
   void clk_gate_shared_free(struct clk *clk)
        ^
---
 drivers/clk/clk-gate-shared.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/clk-gate-shared.c +3 -3
index a95f940dd..c3b678a31 100644
@@ -69,8 +69,8 @@ static struct clk_ops clk_gate_shared_ops = {
 	.is_enabled = clk_gate_shared_is_enabled,
 };
 
-struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const char *companion,
-			   unsigned flags)
+static struct clk *clk_gate_shared_alloc(const char *name, const char *parent,
+				const char *companion, unsigned flags)
 {
 	struct clk_gate_shared *g = xzalloc(sizeof(*g));
 
@@ -86,7 +86,7 @@ struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const ch
 	return &g->clk;
 }
 
-void clk_gate_shared_free(struct clk *clk)
+static void clk_gate_shared_free(struct clk *clk)
 {
 	struct clk_gate_shared *g = to_clk_gate_shared(clk);
 
Signature · 7 lines
2.11.0


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

PATCH 3/3 gui: image_renderer: fix "no previous prototype for 'image_renderer_unregister'" warning

In reply to Antony Pavlov

The patch fixes this compiler's warning:

lib/gui/image_renderer.c:92:6: warning: no previous prototype for 'image_renderer_unregister' [-Wmissing-prototypes]
void image_renderer_unregister(struct image_renderer *ir)

        ^
---
 include/gui/image_renderer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/gui/image_renderer.h +1 -1
index e0b1eae25..bfdea1b14 100644
@@ -32,7 +32,7 @@ struct image_renderer {
 
 #ifdef CONFIG_IMAGE_RENDERER
 int image_renderer_register(struct image_renderer *ir);
-void image_render_unregister(struct image_renderer *ir);
+void image_renderer_unregister(struct image_renderer *ir);
 
 int image_renderer_image(struct screen *sc, struct surface *s, struct image *img);
 
Signature · 7 lines
2.11.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#4 lore raw
In reply to Antony Pavlov
Quoted 5 lines · Antony Pavlov

Antony Pavlov (3):
gui: bmp.c: fix "no previous prototype" warning
clk: clk-gate-shared: fix "no previous prototype" warning
gui: image_renderer: fix "no previous prototype for
'image_renderer_unregister'" warning

Applied, thanks

I notice we currently have -Wmissing-prototypes only on Mips. Maybe we should enable this on other architectures aswell to make these warnings more visible.
On ARM though we have tons of missing prototypes, so we should fix a fair amount of them before enabling this warning in the tree.

Sascha

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