summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-12-07 00:55:15 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2012-01-02 17:16:07 +0400
commit4f5e717413b6627310a245d16f945660c9d60736 (patch)
treeb5ad40f737c27f99b973d7fd3c55b6bd766605bc
parent7e7a2d38b2d5d5edd3be7d6754d67c3231ee215e (diff)
lib: fix SMUX compiler warnings
Make progname a string, and cast when calling asn1. Remove variable set but never used.
-rw-r--r--lib/smux.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/smux.c b/lib/smux.c
index 1941cf8c..b7cd18d1 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -270,7 +270,6 @@ static void
smux_getresp_send (oid objid[], size_t objid_len, long reqid, long errstat,
long errindex, u_char val_type, void *arg, size_t arg_len)
{
- int ret;
u_char buf[BUFSIZ];
u_char *ptr, *h1, *h1e, *h2, *h2e;
size_t len, length;
@@ -326,7 +325,7 @@ smux_getresp_send (oid objid[], size_t objid_len, long reqid, long errstat,
if (debug_smux)
zlog_debug ("SMUX getresp send: %td", (ptr - buf));
- ret = send (smux_sock, buf, (ptr - buf), 0);
+ send (smux_sock, buf, (ptr - buf), 0);
}
static u_char *
@@ -946,7 +945,7 @@ smux_open (int sock)
u_char *ptr;
size_t len;
long version;
- u_char progname[] = QUAGGA_PROGNAME "-" QUAGGA_VERSION;
+ const char progname[] = QUAGGA_PROGNAME "-" QUAGGA_VERSION;
if (debug_smux)
{
@@ -977,7 +976,7 @@ smux_open (int sock)
ptr = asn_build_string (ptr, &len,
(u_char)
(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OCTET_STR),
- progname, strlen (progname));
+ (const u_char *) progname, strlen (progname));
/* SMUX connection password. */
ptr = asn_build_string (ptr, &len,