This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

some compiler warnings in new_net


This fixes some gcc warning when compiling the freeBSD stack
two unmatching prototypes, stuff following #endif and a deprecated use
of __FUNCTION__ (gcc 3.2.1)

There are still some left mostly 'identifier declared but not used' types.


Index: current/src/sys/kern/sockio.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/kern/sockio.c,v
retrieving revision 1.2
diff -u -r1.2 sockio.c
--- current/src/sys/kern/sockio.c	3 Nov 2002 19:49:44 -0000	1.2
+++ current/src/sys/kern/sockio.c	12 Feb 2003 11:32:28 -0000
@@ -145,8 +145,8 @@
 static int bsd_fsync     (struct CYG_FILE_TAG *fp, int mode);        
 static int bsd_close     (struct CYG_FILE_TAG *fp);
 static int bsd_fstat     (struct CYG_FILE_TAG *fp, struct stat *buf);
-static int bsd_getinfo   (struct CYG_FILE_TAG *fp, int key, char *buf, int len);
-static int bsd_setinfo   (struct CYG_FILE_TAG *fp, int key, char *buf, int len);
+static int bsd_getinfo   (struct CYG_FILE_TAG *fp, int key, void *buf, int len);
+static int bsd_setinfo   (struct CYG_FILE_TAG *fp, int key, void *buf, int len);
 
 static int bsd_recvit    (cyg_file *fp, struct msghdr *mp, 
                           socklen_t *namelenp, ssize_t *retsize);
@@ -744,7 +744,7 @@
 // -------------------------------------------------------------------------
 
 static int 
-bsd_getinfo(struct CYG_FILE_TAG *fp, int key, char *buf, int len)
+bsd_getinfo(struct CYG_FILE_TAG *fp, int key, void *buf, int len)
 {
     return ENOSYS;
 }
@@ -752,7 +752,7 @@
 // -------------------------------------------------------------------------
 
 static int 
-bsd_setinfo(struct CYG_FILE_TAG *fp, int key, char *buf, int len)
+bsd_setinfo(struct CYG_FILE_TAG *fp, int key, void *buf, int len)
 {
     return ENOSYS;
 }
Index: current/src/sys/kern/uipc_socket.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/kern/uipc_socket.c,v
retrieving revision 1.1
diff -u -r1.1 uipc_socket.c
--- current/src/sys/kern/uipc_socket.c	20 May 2002 22:25:02 -0000	1.1
+++ current/src/sys/kern/uipc_socket.c	12 Feb 2003 11:32:44 -0000
@@ -1484,7 +1484,7 @@
 int
 sopoll(struct socket *so, int events, struct ucred *cred, struct proc *p)
 {
-    panic(__FUNCTION__"\n");
+    panic("%s\n", __FUNCTION__);
     return 0;
 #if 0 // POLL
 	int revents = 0;
Index: current/src/sys/net/if_ethersubr.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/net/if_ethersubr.c,v
retrieving revision 1.1
diff -u -r1.1 if_ethersubr.c
--- current/src/sys/net/if_ethersubr.c	20 May 2002 22:25:02 -0000	1.1
+++ current/src/sys/net/if_ethersubr.c	12 Feb 2003 11:32:47 -0000
@@ -242,7 +242,7 @@
 	    }
 	    break;
 	  }
-#endif NETATALK
+#endif /* NETATALK */
 #ifdef NS
 	case AF_NS:
 		switch(ns_nettype){
@@ -634,7 +634,7 @@
 		/* probably this should be done with a NETISR as well */
                 aarpinput(IFP2AC(ifp), m); /* XXX */
                 return;
-#endif NETATALK
+#endif /* NETATALK */
 	default:
 #ifdef IPX
 		if (ef_inputp && ef_inputp(ifp, eh, m) == 0)
Index: current/src/sys/net/if_loop.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/net/if_loop.c,v
retrieving revision 1.1
diff -u -r1.1 if_loop.c
--- current/src/sys/net/if_loop.c	20 May 2002 22:25:02 -0000	1.1
+++ current/src/sys/net/if_loop.c	12 Feb 2003 11:32:49 -0000
@@ -94,7 +94,7 @@
 #ifdef NETATALK
 #include <netatalk/at.h>
 #include <netatalk/at_var.h>
-#endif NETATALK
+#endif
 
 int loioctl __P((struct ifnet *, u_long, caddr_t));
 static void lortrequest __P((int, struct rtentry *, struct sockaddr *));
@@ -310,7 +310,7 @@
 	        ifq = &atintrq2;
 		isr = NETISR_ATALK;
 		break;
-#endif NETATALK
+#endif
 	default:
 		printf("if_simloop: can't handle af=%d\n", af);
 		m_freem(m);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]