]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
No more warnings ...
authorJan Maria Matejka <mq@ucw.cz>
Tue, 18 Sep 2018 12:21:11 +0000 (14:21 +0200)
committerJan Maria Matejka <mq@ucw.cz>
Tue, 18 Sep 2018 12:21:11 +0000 (14:21 +0200)
no more warnings
No more warnings over me
And while it is being compiled all the log is black and white
Release BIRD now and then let it flee

(use the melody of well-known Oh Freedom!)

lib/printf.c
nest/a-path.c
proto/bfd/packets.c
proto/ospf/dbdes.c
proto/ospf/ospf.c
proto/ospf/packet.c
proto/radv/radv.c
proto/rip/packets.c
sysdep/unix/io.c
sysdep/unix/krt.c

index cafeeb93157ee133b6f2a125416b978270265e9b..c2065d9a988057a9ddaae007484f1d9db74035b7 100644 (file)
@@ -424,6 +424,7 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
 
                case 'X':
                        flags |= LARGE;
+                       /* fallthrough */
                case 'x':
                        base = 16;
                        break;
index 6bad9747141bcd8862faa1f5a032b5d2d6b62433..6f1c40bfdf654ffa4ad3e825196c266924d6bc4a 100644 (file)
@@ -805,7 +805,7 @@ as_path_match(const struct adata *path, struct f_path_mask *mask)
          val2 = val = mask->val;
          goto step;
        case PM_ASN_EXPR:
-         ASSERT(0);
+         bug("Expressions should be evaluated on AS path mask construction.");
        case PM_ASN_RANGE:
          val = mask->val;
          val2 = mask->val2;
index b76efda6ece716ed74859506a7fc5c59bff0cee5..6d5151eadfec9ec73dddc206b23e5e6914203ac1 100644 (file)
@@ -141,6 +141,7 @@ bfd_fill_authentication(struct bfd_proto *p, struct bfd_session *s, struct bfd_c
   case BFD_AUTH_METICULOUS_KEYED_MD5:
   case BFD_AUTH_METICULOUS_KEYED_SHA1:
     meticulous = 1;
+    /* fallthrough */
 
   case BFD_AUTH_KEYED_MD5:
   case BFD_AUTH_KEYED_SHA1:
@@ -230,6 +231,7 @@ bfd_check_authentication(struct bfd_proto *p, struct bfd_session *s, struct bfd_
   case BFD_AUTH_METICULOUS_KEYED_MD5:
   case BFD_AUTH_METICULOUS_KEYED_SHA1:
     meticulous = 1;
+    /* fallthrough */
 
   case BFD_AUTH_KEYED_MD5:
   case BFD_AUTH_KEYED_SHA1:
index 2626a24c34a4c20e518262d1b3a1557f9af7332b..019aff047e21fa0e7209f7114947df11f4d77a76 100644 (file)
@@ -353,6 +353,7 @@ ospf_receive_dbdes(struct ospf_packet *pkt, struct ospf_iface *ifa,
     ospf_neigh_sm(n, INM_2WAYREC);
     if (n->state != NEIGHBOR_EXSTART)
       return;
+    /* fallthrough */
 
   case NEIGHBOR_EXSTART:
     if ((ifa->type != OSPF_IT_VLINK) &&
index 150f519f5ba54b28e7468d5c70ce3e42354b75c1..327ad0a4f946e577895f8ddf43f45840d1226a4f 100644 (file)
@@ -1200,6 +1200,7 @@ ospf_sh_state(struct proto *P, int verbose, int reachable)
        he->domain = 1; /* Abuse domain field to mark the LSA */
        hex[jx++] = he;
       }
+      /* fallthrough */
     default:
       accept = 0;
     }
index db387661c90fc0b8cf4fb5056c57b72b5bba735e..599f3094eb6096dd0fa452b263c8435daefa9f01 100644 (file)
@@ -57,6 +57,7 @@ ospf_pkt_finalize2(struct ospf_iface *ifa, struct ospf_packet *pkt, uint *plen)
       return;
     }
     strncpy(auth->password, pass->password, sizeof(auth->password));
+    /* fallthrough */
 
   case OSPF_AUTH_NONE:
     {
index 389f598c6f78f49a9733fb79c3f5022e176d5591..a381f7372a491509a2dd310e6c1a52c98e80b727 100644 (file)
@@ -230,6 +230,7 @@ radv_iface_notify(struct radv_iface *ifa, int event)
   {
   case RA_EV_CHANGE:
     radv_invalidate(ifa);
+    /* fallthrough */
   case RA_EV_INIT:
     ifa->initial = MAX_INITIAL_RTR_ADVERTISEMENTS;
     radv_prepare_prefixes(ifa);
index 1b65362f7d153786d0cb90f8c61f4dd3f5822658..59ffd7c24f2414011b422752add65490e1e96ccd 100644 (file)
@@ -58,13 +58,17 @@ struct rip_block_auth
 {
   u16 must_be_ffff;
   u16 auth_type;
-  char password[0];
-  u16 packet_len;
-  u8 key_id;
-  u8 auth_len;
-  u32 seq_num;
-  u32 unused1;
-  u32 unused2;
+  union {
+    char password[16];
+    struct {
+      u16 packet_len;
+      u8 key_id;
+      u8 auth_len;
+      u32 seq_num;
+      u32 unused1;
+      u32 unused2;
+    };
+  };
 };
 
 /* Authentication tail, RFC 4822 */
index a960b7f89e42d410bb340217e7f88b3d5671e954..4455fc1991999dcdc7b387cf98e928ad913a7c1f 100644 (file)
@@ -1128,7 +1128,7 @@ sk_ssh_connect(sock *s)
     default:
       return SSH_ERROR;
     }
-  }
+  } /* fallthrough */
 
   case SK_SSH_SERVER_KNOWN:
   {
@@ -1175,7 +1175,7 @@ sk_ssh_connect(sock *s)
       if (!server_identity_is_ok)
        return SSH_ERROR;
     }
-  }
+  } /* fallthrough */
 
   case SK_SSH_USERAUTH:
   {
@@ -1191,7 +1191,7 @@ sk_ssh_connect(sock *s)
     default:
       return SSH_ERROR;
     }
-  }
+  } /* fallthrough */
 
   case SK_SSH_CHANNEL:
   {
@@ -1199,7 +1199,7 @@ sk_ssh_connect(sock *s)
     s->ssh->channel = ssh_channel_new(s->ssh->session);
     if (s->ssh->channel == NULL)
       return SSH_ERROR;
-  }
+  } /* fallthrough */
 
   case SK_SSH_SESSION:
   {
@@ -1215,7 +1215,7 @@ sk_ssh_connect(sock *s)
     default:
       return SSH_ERROR;
     }
-  }
+  } /* fallthrough */
 
   case SK_SSH_SUBSYSTEM:
   {
@@ -1234,7 +1234,7 @@ sk_ssh_connect(sock *s)
        return SSH_ERROR;
       }
     }
-  }
+  } /* fallthrough */
 
   case SK_SSH_ESTABLISHED:
     s->ssh->state = SK_SSH_ESTABLISHED;
index a79df54eac9913275bb05198facef48f07d029c9..794ebcd014b47e3a5890fb7cbdbd12fd720cecd5 100644 (file)
@@ -784,7 +784,8 @@ krt_got_route_async(struct krt_proto *p, rte *e, int new)
   switch (e->u.krt.src)
     {
     case KRT_SRC_BIRD:
-      ASSERT(0);                       /* Should be filtered by the back end */
+      /* Should be filtered by the back end */
+      bug("BIRD originated routes should not get here.");
 
     case KRT_SRC_REDIRECT:
       if (new)