summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorpaul <paul>2006-01-19 20:16:55 +0000
committerpaul <paul>2006-01-19 20:16:55 +0000
commite8e1946edf6ba87ef53832cdceccc39d7f0c3f26 (patch)
treefcdaf92bf4129a8a58825bd21ae841a6b3b2bda8 /ospfd
parent779adb0147cfff1a831b08853976342ad2110fcd (diff)
[compiler] miscellaneous trivial compiler warning fixes
2006-01-19 Paul Jakma <paul.jakma@sun.com> * (general) various miscellaneous compiler warning fixes. Remove redundant break statements from switch clauses which return. return from main, not exit, cause it annoys SOS. Remove stray semi-colons which cause empty-statement warnings. * zebra/main.c: (sighup) remove private declaration of external function.
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog9
-rw-r--r--ospfd/ospf_dump.c1
-rw-r--r--ospfd/ospf_lsa.c4
-rw-r--r--ospfd/ospf_main.c2
-rw-r--r--ospfd/ospf_routemap.c8
-rw-r--r--ospfd/ospf_vty.c2
6 files changed, 11 insertions, 15 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index e5f83378..a5a1753a 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,12 @@
+2006-01-19 Paul Jakma <paul.jakma@sun.com>
+
+ * (general) various miscellaneous compiler warning fixes.
+ Remove redundant break statements from switch clauses
+ which return.
+ return from main, not exit, cause it annoys SOS.
+ Remove stray semi-colons which cause empty-statement
+ warnings.
+
2006-01-18 Juergen Kammer <j.kammer@eurodata.de>
* ospf_lsa.c: (ospf_router_lsa_new) dont take reference to the
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index 859e3bc9..95d24b1a 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -181,7 +181,6 @@ ospf_area_desc_string (struct ospf_area *area)
break;
default:
return ospf_area_name_string (area);
- break;
}
return buf;
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 89e4d535..8ef4da66 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -3219,13 +3219,11 @@ ospf_lsa_lookup (struct ospf_area *area, u_int32_t type,
case OSPF_OPAQUE_AREA_LSA:
#endif /* HAVE_OPAQUE_LSA */
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, adv_router);
- break;
case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
return ospf_lsdb_lookup_by_id (ospf->lsdb, type, id, adv_router);
- break;
default:
break;
}
@@ -3244,7 +3242,6 @@ ospf_lsa_lookup_by_id (struct ospf_area *area, u_int32_t type,
{
case OSPF_ROUTER_LSA:
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, id);
- break;
case OSPF_NETWORK_LSA:
for (rn = route_top (NETWORK_LSDB (area)); rn; rn = route_next (rn))
if ((lsa = rn->info))
@@ -3259,7 +3256,6 @@ ospf_lsa_lookup_by_id (struct ospf_area *area, u_int32_t type,
/* Currently not used. */
assert (1);
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, id);
- break;
case OSPF_AS_EXTERNAL_LSA:
case OSPF_AS_NSSA_LSA:
#ifdef HAVE_OPAQUE_LSA
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 3225d7d7..c105f192 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -321,6 +321,6 @@ main (int argc, char **argv)
thread_call (&thread);
/* Not reached. */
- exit (0);
+ return (0);
}
diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c
index 6c89b22a..adf81583 100644
--- a/ospfd/ospf_routemap.c
+++ b/ospfd/ospf_routemap.c
@@ -110,11 +110,9 @@ ospf_route_match_delete (struct vty *vty, struct route_map_index *index,
case RMAP_RULE_MISSING:
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
case RMAP_COMPILE_ERROR:
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
}
}
@@ -135,11 +133,9 @@ ospf_route_match_add (struct vty *vty, struct route_map_index *index,
case RMAP_RULE_MISSING:
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
case RMAP_COMPILE_ERROR:
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
}
}
@@ -160,11 +156,9 @@ ospf_route_set_add (struct vty *vty, struct route_map_index *index,
case RMAP_RULE_MISSING:
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
case RMAP_COMPILE_ERROR:
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
}
}
@@ -186,11 +180,9 @@ ospf_route_set_delete (struct vty *vty, struct route_map_index *index,
case RMAP_RULE_MISSING:
vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
case RMAP_COMPILE_ERROR:
vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
return CMD_WARNING;
- break;
}
}
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 32dfdea0..0b74bdf1 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -3870,7 +3870,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
- break;;
+ break;
default:
continue;
}