]> git.ozlabs.org Git - ppp.git/commitdiff
Some tiny fixes (minor castings) to remove annoying compiler warnings
authorAdi Masputra <adi.masputra@sun.com>
Sat, 15 Apr 2000 01:27:13 +0000 (01:27 +0000)
committerAdi Masputra <adi.masputra@sun.com>
Sat, 15 Apr 2000 01:27:13 +0000 (01:27 +0000)
pppd/auth.c
pppd/ccp.c
pppd/demand.c
pppd/ipcp.c
pppd/ipv6cp.c
pppd/lcp.c
pppd/main.c
pppd/options.c

index 023653d5d15c0036e12437bdd6524779a2496253..4ca883ca8b7081d4a1437466bf1f5d2e3a249d24 100644 (file)
@@ -32,7 +32,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: auth.c,v 1.64 2000/04/13 12:05:57 paulus Exp $"
+#define RCSID  "$Id: auth.c,v 1.65 2000/04/15 01:27:10 masputra Exp $"
 
 #include <stdio.h>
 #include <stddef.h>
@@ -229,14 +229,14 @@ option_t auth_options[] = {
       "Use system password database for PAP", 1 },
     { "papcrypt", o_bool, &cryptpap,
       "PAP passwords are encrypted", 1 },
-    { "+ua", o_special, setupapfile,
+    { "+ua", o_special, (void *)setupapfile,
       "Get PAP user and password from file" },
     { "password", o_string, passwd,
       "Password for authenticating us to the peer", OPT_STATIC,
       NULL, MAXSECRETLEN },
-    { "privgroup", o_special, privgroup,
+    { "privgroup", o_special, (void *)privgroup,
       "Allow group members to use privileged options", OPT_PRIV },
-    { "allow-ip", o_special, set_noauth_addr,
+    { "allow-ip", o_special, (void *)set_noauth_addr,
       "Set IP address(es) which can be used without authentication",
       OPT_PRIV },
     { NULL }
index d6da2d56923fe8493eaa7aee6dabf90d3ceb3c3e..7cfd692fd3558409bcf64c3f117db725c56a8437 100644 (file)
@@ -25,7 +25,7 @@
  * OR MODIFICATIONS.
  */
 
-#define RCSID  "$Id: ccp.c,v 1.29 1999/08/13 06:46:11 paulus Exp $"
+#define RCSID  "$Id: ccp.c,v 1.30 2000/04/15 01:27:11 masputra Exp $"
 
 #include <stdlib.h>
 #include <string.h>
@@ -48,7 +48,7 @@ static option_t ccp_option_list[] = {
       "Disable CCP negotiation" },
     { "-ccp", o_bool, &ccp_protent.enabled_flag,
       "Disable CCP negotiation" },
-    { "bsdcomp", o_special, setbsdcomp,
+    { "bsdcomp", o_special, (void *)setbsdcomp,
       "Request BSD-Compress packet compression" },
     { "nobsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress,
       "don't allow BSD-Compress", OPT_A2COPY,
@@ -56,7 +56,7 @@ static option_t ccp_option_list[] = {
     { "-bsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress,
       "don't allow BSD-Compress", OPT_A2COPY,
       &ccp_allowoptions[0].bsd_compress },
-    { "deflate", 1, setdeflate,
+    { "deflate", 1, (void *)setdeflate,
       "request Deflate compression" },
     { "nodeflate", o_bool, &ccp_wantoptions[0].deflate,
       "don't allow Deflate compression", OPT_A2COPY,
@@ -1150,7 +1150,7 @@ ccp_printpkt(p, plen, printer, arg)
     case TERMACK:
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }
index bb6538cace93d9963459ede30e73b00b14f74e3e..adb12b9a39da447e3cba4d91b73ceb540bf7b91c 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: demand.c,v 1.12 1999/08/13 06:46:12 paulus Exp $";
+#define RCSID  "$Id: demand.c,v 1.13 2000/04/15 01:27:11 masputra Exp $"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -216,7 +216,7 @@ loop_chars(p, n)
            if (!escape_flag && !flush_flag
                && framelen > 2 && fcs == PPP_GOODFCS) {
                framelen -= 2;
-               if (loop_frame(frame, framelen))
+               if (loop_frame((unsigned char *)frame, framelen))
                    rv = 1;
            }
            framelen = 0;
index 829b2c97b436a6a6801669bc7080f10a76c38301..484c00c4b988c9a49f58b6912d9cd55e12a2fd4d 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: ipcp.c,v 1.53 2000/04/04 07:06:49 paulus Exp $"
+#define RCSID  "$Id: ipcp.c,v 1.54 2000/04/15 01:27:11 masputra Exp $"
 
 /*
  * TODO:
@@ -115,7 +115,7 @@ static option_t ipcp_option_list[] = {
     { "-vjccomp", o_bool, &ipcp_wantoptions[0].cflag,
       "Disable VJ connection-ID compression", OPT_A2COPY,
       &ipcp_allowoptions[0].cflag },
-    { "vj-max-slots", 1, setvjslots,
+    { "vj-max-slots", 1, (void *)setvjslots,
       "Set maximum VJ header slots" },
     { "ipcp-accept-local", o_bool, &ipcp_wantoptions[0].accept_local,
       "Accept peer's address for us", 1 },
@@ -125,9 +125,9 @@ static option_t ipcp_option_list[] = {
       "Set ip script parameter" },
     { "noipdefault", o_bool, &disable_defaultip,
       "Don't use name for default IP adrs", 1 },
-    { "ms-dns", 1, setdnsaddr,
+    { "ms-dns", 1, (void *)setdnsaddr,
       "DNS address for the peer's use" },
-    { "ms-wins", 1, setwinsaddr,
+    { "ms-wins", 1, (void *)setwinsaddr,
       "Nameserver for SMB over TCP/IP for peer" },
     { "ipcp-restart", o_int, &ipcp_fsm[0].timeouttime,
       "Set timeout for IPCP" },
@@ -1793,7 +1793,7 @@ ipcp_printpkt(p, plen, printer, arg)
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
            printer(arg, " ");
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }
index 98cae543fe29eb9d88658bb6c2ff12b9eee3c3e7..a80f222d908c203f0097354ba3a75c0a88b6fb00 100644 (file)
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * $Id: ipv6cp.c,v 1.8 2000/04/04 07:06:50 paulus Exp $ 
+ * $Id: ipv6cp.c,v 1.9 2000/04/15 01:27:11 masputra Exp $ 
  */
 
-#define RCSID  "$Id: ipv6cp.c,v 1.8 2000/04/04 07:06:50 paulus Exp $"
+#define RCSID  "$Id: ipv6cp.c,v 1.9 2000/04/15 01:27:11 masputra Exp $"
 
 /*
  * TODO: 
@@ -179,7 +179,7 @@ static fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */
 static int setifaceid __P((char **arg));
 
 static option_t ipv6cp_option_list[] = {
-    { "ipv6", o_special, setifaceid,
+    { "ipv6", o_special, (void *)setifaceid,
       "Set interface identifiers for IPV6" },
     { "noipv6", o_bool, &ipv6cp_protent.enabled_flag,
       "Disable IPv6 and IPv6CP" },
@@ -916,14 +916,14 @@ ipv6cp_reqci(f, inp, len, reject_if_disagree)
                orc = CONFREJ;
                break;
            }
-#else
-           orc = CONFREJ;
-           break;
-#endif
 
            ho->neg_vj = 1;
            ho->vj_protocol = cishort;
            break;
+#else
+           orc = CONFREJ;
+           break;
+#endif
 
        default:
            orc = CONFREJ;
@@ -1423,7 +1423,7 @@ ipv6cp_printpkt(p, plen, printer, arg)
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
            printer(arg, " ");
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }
index ff17fb0b29d2325cb7404aa0eafb99bc76bffe89..f0e453db458c5d9f465c5b16af8fc3f28e6f2236 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: lcp.c,v 1.51 2000/04/13 12:05:57 paulus Exp $";
+#define RCSID  "$Id: lcp.c,v 1.52 2000/04/15 01:27:12 masputra Exp $"
 
 /*
  * TODO:
@@ -96,7 +96,7 @@ static option_t lcp_option_list[] = {
       "Set passive mode", 1 },
     { "silent", o_bool, &lcp_wantoptions[0].silent,
       "Set silent mode", 1 },
-    { "escape", o_special, setescape,
+    { "escape", o_special, (void *)setescape,
       "List of character codes to escape on transmission" },
     { "lcp-echo-failure", o_int, &lcp_echo_fails,
       "Set number of consecutive echo failures to indicate link failure" },
@@ -1986,7 +1986,7 @@ lcp_printpkt(p, plen, printer, arg)
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
            printer(arg, " ");
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }
index ca6e50a7be34c69228cbe115c7ef76d10a024ead..ad7c90d0910bd0b5831c01cf0ae87fa64106c3c0 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: main.c,v 1.93 2000/04/13 12:05:59 paulus Exp $"
+#define RCSID  "$Id: main.c,v 1.94 2000/04/15 01:27:13 masputra Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -83,7 +83,7 @@ static uid_t uid;             /* Our real user-id */
 static int conn_running;       /* we have a [dis]connector running */
 
 int ttyfd;                     /* Serial port file descriptor */
-mode_t tty_mode = -1;          /* Original access permissions to tty */
+mode_t tty_mode = (mode_t)-1;  /* Original access permissions to tty */
 int baud_rate;                 /* Actual bits/second for serial device */
 int hungup;                    /* terminal has been hung up */
 int privileged;                        /* we're running as real uid root */
@@ -2143,7 +2143,7 @@ open_socket(dest)
     sad.sin_family = AF_INET;
     sad.sin_port = htons(port);
     sad.sin_addr.s_addr = host;
-    if (connect(sock, &sad, sizeof(sad)) < 0) {
+    if (connect(sock, (struct sockaddr *)&sad, sizeof(sad)) < 0) {
        error("Can't connect to %s: %m", dest);
        close(sock);
        return -1;
index 5f22c1759485442c519478b89d79d507f8be7113..9e8158aaf0836aabb22cde749f79631b3210a6a2 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: options.c,v 1.73 2000/04/13 12:05:16 paulus Exp $"
+#define RCSID  "$Id: options.c,v 1.74 2000/04/15 01:27:13 masputra Exp $"
 
 #include <ctype.h>
 #include <stdio.h>
@@ -192,7 +192,7 @@ option_t general_options[] = {
       "Set time in seconds before disconnecting idle link" },
     { "lock", o_bool, &lockflag,
       "Lock serial device with UUCP-style lock file", 1 },
-    { "-all", o_special_noarg, noopt,
+    { "-all", o_special_noarg, (void *)noopt,
       "Don't request/allow any LCP or IPCP options (useless)" },
     { "init", o_string, &initializer,
       "A program to initialize the device",
@@ -227,21 +227,21 @@ option_t general_options[] = {
       "Set alternate hardware (DTR/CTS) flow control", OPT_NOARG|OPT_VAL(2) },
     { "nocdtrcts", o_int, &crtscts,
       "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) },
-    { "xonxoff", o_special_noarg, setxonxoff,
+    { "xonxoff", o_special_noarg, (void *)setxonxoff,
       "Set software (XON/XOFF) flow control" },
-    { "domain", o_special, setdomain,
+    { "domain", o_special, (void *)setdomain,
       "Add given domain name to hostname" },
     { "mtu", o_int, &lcp_allowoptions[0].mru,
       "Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU },
-    { "netmask", o_special, setnetmask,
+    { "netmask", o_special, (void *)setnetmask,
       "set netmask" },
     { "modem", o_bool, &modem,
       "Use modem control lines", 1 },
     { "local", o_bool, &modem,
       "Don't use modem control lines" },
-    { "file", o_special, readfile,
+    { "file", o_special, (void *)readfile,
       "Take options from a file", OPT_PREPASS },
-    { "call", o_special, callfile,
+    { "call", o_special, (void *)callfile,
       "Take options from a privileged file", OPT_PREPASS },
     { "persist", o_bool, &persist,
       "Keep on reopening connection after close", 1 },
@@ -249,18 +249,18 @@ option_t general_options[] = {
       "Turn off persist option" },
     { "demand", o_bool, &demand,
       "Dial on demand", OPT_INITONLY | 1, &persist },
-    { "--version", o_special_noarg, showversion,
+    { "--version", o_special_noarg, (void *)showversion,
       "Show version number" },
-    { "--help", o_special_noarg, showhelp,
+    { "--help", o_special_noarg, (void *)showhelp,
       "Show brief listing of options" },
-    { "-h", o_special_noarg, showhelp,
+    { "-h", o_special_noarg, (void *)showhelp,
       "Show brief listing of options" },
     { "sync", o_bool, &sync_serial,
       "Use synchronous HDLC serial encoding", 1 },
     { "logfd", o_int, &log_to_fd,
       "Send log messages to this file descriptor",
       0, &log_to_specific_fd },
-    { "logfile", o_special, setlogfile,
+    { "logfile", o_special, (void *)setlogfile,
       "Append log messages to this file" },
     { "nolog", o_int, &log_to_fd,
       "Don't send log messages to any file",
@@ -296,7 +296,7 @@ option_t general_options[] = {
       "Bundle name for multilink" },
 #endif /* HAVE_MULTILINK */
 #ifdef PLUGIN
-    { "plugin", o_special, loadplugin,
+    { "plugin", o_special, (void *)loadplugin,
       "Load a plug-in module into pppd", OPT_PRIV },
 #endif
 
@@ -1601,7 +1601,7 @@ loadplugin(argv)
        option_error("Couldn't load plugin %s", arg);
        return 0;
     }
-    init = dlsym(handle, "plugin_init");
+    init = (void (*)(void))dlsym(handle, "plugin_init");
     if (init == 0) {
        option_error("%s has no initialization entry point", arg);
        dlclose(handle);