Insidious minimal-net segmentation fault if initialized ptr not declared static.

This commit is contained in:
dak664 2011-02-19 15:43:43 -05:00
parent 8f9cf50e55
commit 263f7e6ebd

View file

@ -185,7 +185,10 @@ PT_THREAD(handle_script(struct httpd_state *s))
static static
PT_THREAD(send_headers(struct httpd_state *s, const char *statushdr)) 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); PSOCK_BEGIN(&s->sout);