AnsweredAssumed Answered

"too many initializers" ERROR with  const HTTPD_CGI_LINK_STRUCT cgi_lnk_tbl[] =

Question asked by joe krell on Mar 29, 2013
Latest reply on Apr 1, 2013 by joe krell

Hello ,


I thought it did something very simple but alas perhaps I lost my head and so any help is appreciated! (code warrior 10_3 and mqx4_0 kinetis platform)


I just added one more entry to cgi_link_tbl and get and I get a "too many initializers error"?


In cgi_index.c I added to the table

const HTTPD_CGI_LINK_STRUCT cgi_lnk_tbl[] = {
    { "led_form_currentvalues", cgi_led_form_currentvalues},
  { 0, 0 }    // DO NOT REMOVE - last item - end of table

Then I defined the functiuon:

_mqx_int cgi_led_form_currentvalues(HTTPD_SESSION_STRUCT *session)
  if (Operations.Platform=='c' )
       CGI_SEND_STR("<font color=\"blue\">compact shelf</font>");
   else if (Operations.Platform=='m' )
   CGI_SEND_STR("<font color=\"blue\">min-shelf</font>");
     CGI_SEND_STR("<font color=\"blue\">unknown</font>");
  return session->request.content_len;



I declared in  cgi.h

_mqx_int cgi_led_form_currentvalues(HTTPD_SESSION_STRUCT *session);


The tfs_data.c was regenerated ith said function.


This was a formula I followed multiple times and no problem, but this time.....?

Any help would be appreciated.



Please use C++ highlight for code (last icon (>>)) Message was edited by: Martin Kojtal