From 263f7e6ebd4fb126fa8aa7be57493be61c03c57b Mon Sep 17 00:00:00 2001 From: dak664 Date: Sat, 19 Feb 2011 15:43:43 -0500 Subject: [PATCH] Insidious minimal-net segmentation fault if initialized ptr not declared static. --- apps/webserver/httpd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/webserver/httpd.c b/apps/webserver/httpd.c index fc80b5b05..59533b095 100644 --- a/apps/webserver/httpd.c +++ b/apps/webserver/httpd.c @@ -185,7 +185,10 @@ PT_THREAD(handle_script(struct httpd_state *s)) static PT_THREAD(send_headers(struct httpd_state *s, const char *statushdr)) { - const char *ptr = NULL; //gcc warning if not initialized +/* gcc warning if not initialized. + * If initialized, minimal-net platform segmentation fault if not static... + */ + static const char *ptr = NULL; PSOCK_BEGIN(&s->sout);