linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ron Michael Khu <ronkhu@ntsp.nec.co.jp>
To: Scott <drmemory@3rivers.net>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Initializer element is not constant
Date: Sat, 22 Jan 2005 01:46:31 +0800	[thread overview]
Message-ID: <41F13FF7.4020802@hq.ntsp.nec.co.jp> (raw)
In-Reply-To: <20050121162726.GA977@drmemory.local>

have u tried changing the first field of each element??
something like... replacing those char ptrs with something static?

example:

DATUM recip_data[] = {
{  "i am a constant str", NAMECTRL_LEN, make_upper },       
{  "i am a constant str", NAME1_LEN, make_upper },

u might notice that some of  "initializer element is not constant" 
errors will be significantly reduced....

perhaps, the compiler is complaining that u have used something 
"dynamic"(or at least non-static) in defining a
"statically" allocated data structure(recip_data)
=(

perhaps u can change the way u define/declare ur variables/data 
structures....


Scott wrote:

>On Fri, Jan 21, 2005 at 10:37:12AM +0800, Ron Michael Khu wrote:
>  
>
>>Hi,
>>
>>can u point us to line 124??
>>
>>    
>>
>>>>DATUM recip_data[] = {
>>>>{  namectrl, NAMECTRL_LEN, make_upper },        <-- Line 124
>>>>{  name1, NAME1_LEN, make_upper },
>>>>        
>>>>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>  
>




  reply	other threads:[~2005-01-21 17:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-20 23:21 Initializer element is not constant Scott
     [not found] ` <41F06AC1.2000605@hq.ntsp.nec.co.jp>
2005-01-21  2:37   ` Ron Michael Khu
2005-01-21 16:27     ` Scott
2005-01-21 17:46       ` Ron Michael Khu [this message]
2005-01-21 18:54         ` Scott
2005-01-21 19:50           ` Ron Michael Khu
2005-01-21 21:31             ` Scott
2005-01-22 21:12               ` Christoph Bussenius
2005-01-24 20:44                 ` Scott
  -- strict thread matches above, loose matches on Subject: below --
2005-01-24 21:09 Huber, George K RDECOM CERDEC STCD SRI
2005-01-24 21:28 ` Scott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41F13FF7.4020802@hq.ntsp.nec.co.jp \
    --to=ronkhu@ntsp.nec.co.jp \
    --cc=drmemory@3rivers.net \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).