[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.
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index e5f8337..a5a1753 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 859e3bc..95d24b1 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -181,7 +181,6 @@
break;
default:
return ospf_area_name_string (area);
- break;
}
return buf;
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 89e4d53..8ef4da6 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -3219,13 +3219,11 @@
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 @@
{
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 @@
/* 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 3225d7d..c105f19 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -321,6 +321,6 @@
thread_call (&thread);
/* Not reached. */
- exit (0);
+ return (0);
}
diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c
index 6c89b22..adf8158 100644
--- a/ospfd/ospf_routemap.c
+++ b/ospfd/ospf_routemap.c
@@ -110,11 +110,9 @@
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 @@
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 @@
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 @@
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 32dfdea..0b74bdf 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -3870,7 +3870,7 @@
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
- break;;
+ break;
default:
continue;
}