From bafc19addd7f9edbf00070ffd6b7c7675ccbf493 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 26 Mar 2010 14:11:55 +0000 Subject: [PATCH] make some char-pointer-arrays const, add default cases on all switches --- apps/shell/shell.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/shell/shell.c b/apps/shell/shell.c index ad8a346..a36cc17 100644 --- a/apps/shell/shell.c +++ b/apps/shell/shell.c @@ -101,7 +101,7 @@ quit: quits."NEWLINE""; #define STAT_NUM (((5 + UDP_STATS) * 12) + (4) + (11 * 4) + (2 * 3)) -static char *stat_msgs[STAT_NUM] = { +static const char *stat_msgs[STAT_NUM] = { "Link level * transmitted ", " * received ", " forwarded ", @@ -232,7 +232,7 @@ static char *stat_msgs[STAT_NUM] = { " * errors " }; -static char *stat_formats[STAT_NUM] = { +static const char *stat_formats[STAT_NUM] = { U16_F, /* link xmit */ U16_F, /* link recv */ U16_F, /* link fw */ @@ -1366,6 +1366,9 @@ error(s8_t err, struct netconn *conn) case ETOOMANY: sendstr("## Too many arguments to command given"NEWLINE, conn); break; + default: + LWIP_ASSERT("Unknown error", 0); + break; } } /*-----------------------------------------------------------------------------------*/