Just saw and fixed few warnings on 'make others' in examples/loadable.

Tim
From dd84f7ab279f6d2ad38618280ed45eff21fab07e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim Rühsen?= <tim.rueh...@gmx.de>
Date: Mon, 31 Oct 2016 12:43:42 +0100
Subject: [PATCH 1/2] Fix gcc warnings in examples/loadables/cat.c

---
 examples/loadables/cat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/loadables/cat.c b/examples/loadables/cat.c
index 1ce2e2d..a996e6f 100644
--- a/examples/loadables/cat.c
+++ b/examples/loadables/cat.c
@@ -42,7 +42,7 @@ int	fd;
 	char	buf[1024], *s;
 	int	n, w, e;

-	while (n = read(fd, buf, sizeof (buf))) {
+	while ((n = read(fd, buf, sizeof (buf)))) {
 		w = write(1, buf, n);
 		if (w != n) {
 			e = errno;
@@ -56,7 +56,7 @@ int	fd;
 	return 0;
 }

-cat_main (argc, argv)
+int cat_main (argc, argv)
 int	argc;
 char	**argv;
 {
@@ -88,7 +88,7 @@ char	**argv;
 	return (r);
 }

-cat_builtin(list)
+int cat_builtin(list)
 WORD_LIST *list;
 {
 	char	**v;
--
2.10.2

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to