]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/smux.c
[autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warnings
[mirror_frr.git] / lib / smux.c
index c9b7a8809d7a2e152538d40202453854c581b542..8218c44081e44c907c10e369ba1dc3b49d607a08 100644 (file)
@@ -237,9 +237,9 @@ smux_socket ()
 
   memset (&serv, 0, sizeof (struct sockaddr_in));
   serv.sin_family = AF_INET;
-#ifdef HAVE_SIN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
   serv.sin_len = sizeof (struct sockaddr_in);
-#endif /* HAVE_SIN_LEN */
+#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
 
   sp = getservbyname ("smux", "tcp");
   if (sp != NULL) 
@@ -963,7 +963,7 @@ smux_open (int sock)
   version = 0;
   ptr = asn_build_int (ptr, &len, 
                       (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-                      &version, sizeof (u_long));
+                      &version, sizeof (version));
 
   /* SMUX connection oid. */
   ptr = asn_build_objid (ptr, &len,
@@ -1026,25 +1026,25 @@ smux_trap (oid *name, size_t namelen,
   ptr = asn_build_string (ptr, &len, 
                          (u_char)
                          (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_IPADDRESS),
-                         (u_char *)&addr, sizeof (struct in_addr));
+                         (u_char *)&addr, sizeof (addr));
 
   /* Generic trap integer. */
   val = SNMP_TRAP_ENTERPRISESPECIFIC;
   ptr = asn_build_int (ptr, &len, 
                       (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-                      &val, sizeof (int));
+                      &val, sizeof (val));
 
   /* Specific trap integer. */
   val = sptrap;
   ptr = asn_build_int (ptr, &len, 
                       (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-                      &val, sizeof (int));
+                      &val, sizeof (val));
 
   /* Timeticks timestamp. */
   val = 0;
   ptr = asn_build_unsigned_int (ptr, &len, 
                                (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_TIMETICKS),
-                               &val, sizeof (int));
+                               &val, sizeof (val));
   
   /* Variables. */
   h1 = ptr;
@@ -1091,7 +1091,7 @@ smux_trap (oid *name, size_t namelen,
               smux_oid_dump ("Trap", iname, inamelen);
             }
           smux_oid_dump ("Trap", oid, oid_len);
-          zlog_info ("BUFSIZ: %d // oid_len: %d", BUFSIZ, oid_len);
+          zlog_info ("BUFSIZ: %d // oid_len: %lu", BUFSIZ, (u_long)oid_len);
       }
 
       ret = smux_get (oid, &oid_len, 1, &val_type, &val, &val_len);
@@ -1148,13 +1148,13 @@ smux_register (int sock)
       priority = -1;
       ptr = asn_build_int (ptr, &len, 
                          (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-                         &priority, sizeof (u_long));
+                         &priority, sizeof (priority));
 
       /* Operation. */
       operation = 2; /* Register R/W */
       ptr = asn_build_int (ptr, &len, 
                          (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-                         &operation, sizeof (u_long));
+                         &operation, sizeof (operation));
 
       if (debug_smux)
         {