From 805360b8e50e69573ec446674f640c9b7704cb34 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Sep 2014 14:20:35 +0200 Subject: pppd: Fix warnings --- cpukit/libnetworking/net/if_ppp.c | 12 +++++++++++- cpukit/pppd/rtemspppd.h | 13 +++++++++++-- testsuites/samples/pppd/netconfig.h | 4 +--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/cpukit/libnetworking/net/if_ppp.c b/cpukit/libnetworking/net/if_ppp.c index 3f9c16fff7..a1d7a62568 100644 --- a/cpukit/libnetworking/net/if_ppp.c +++ b/cpukit/libnetworking/net/if_ppp.c @@ -89,6 +89,7 @@ #include #include #include +#include #include #include #include @@ -257,7 +258,9 @@ static rtems_task ppp_txdaemon(rtems_task_argument arg) rtems_event_set events; int iprocess = (int )0; struct ppp_softc *sc = (struct ppp_softc *)arg; +#ifdef LALL_X struct mbuf *mp; +#endif struct mbuf *mf; struct mbuf *m; struct rtems_termios_tty *tp; @@ -322,7 +325,9 @@ static rtems_task ppp_txdaemon(rtems_task_argument arg) /* loop over all mbufs in chain */ mf = NULL; +#ifdef LALL_X mp = NULL; +#endif m = sc->sc_outm; sc->sc_outmc = m; @@ -1421,7 +1426,10 @@ ppp_inproc(struct ppp_softc *sc, struct mbuf *m) struct ifnet *ifp = &sc->sc_if; struct ifqueue *inq; int s, ilen, proto, rv; - u_char *cp, adrs, ctrl; + u_char *cp; +#ifdef VJC + u_char adrs, ctrl; +#endif struct mbuf *mp; #ifdef PPP_COMPRESS struct mbuf *dmp = NULL; @@ -1443,8 +1451,10 @@ ppp_inproc(struct ppp_softc *sc, struct mbuf *m) } cp = mtod(m, u_char *); +#ifdef VJC adrs = PPP_ADDRESS(cp); ctrl = PPP_CONTROL(cp); +#endif proto = PPP_PROTOCOL(cp); if (m->m_flags & M_ERRMARK) { diff --git a/cpukit/pppd/rtemspppd.h b/cpukit/pppd/rtemspppd.h index d927650707..a6c8d0b398 100644 --- a/cpukit/pppd/rtemspppd.h +++ b/cpukit/pppd/rtemspppd.h @@ -6,13 +6,14 @@ * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.org/license/LICENSE. - * - * $Id$ */ #ifndef RTEMSPPPD_H #define RTEMSPPPD_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ /* define hook function identifiers */ #define RTEMS_PPPD_LINKUP_HOOK 1 @@ -37,4 +38,12 @@ int rtems_pppd_set_option(const char *pOption, const char *pValue); int rtems_pppd_connect(void); int rtems_pppd_disconnect(void); +struct rtems_bsdnet_ifconfig; + +int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/testsuites/samples/pppd/netconfig.h b/testsuites/samples/pppd/netconfig.h index f7f5682d4f..f1d6494864 100644 --- a/testsuites/samples/pppd/netconfig.h +++ b/testsuites/samples/pppd/netconfig.h @@ -2,9 +2,7 @@ #define NETCONFIG_H_ #include - -/* external function prototypes */ -extern int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching); +#include /* Default network interface */ static struct rtems_bsdnet_ifconfig netdriver_config = { -- cgit v1.2.3