473,806 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does near intialization mean

Hi
I am using a line of as
char recvedValues[ROWS][COLUMNS] = {'\0'};
in my code. I get a warning as near initialization for
recvedValues[0].
I am using gcc 3.4
Can anybody please explain the meaning.

Thanks
Aditya

Nov 12 '07
65 3617
In article <11************ **********@50g2 000hsm.googlegr oups.com>,
Boltar <bo********@yah oo.co.ukwrote:
>
Chris Dollin wrote:
>* people learning to find things out for themselves using the search
tools available helps them and the communities they partake in.

If a newsgroup dedicated to C isn't an online community I'm not sure
what is.
So comp.lang.c is an online community, and therefore you shouldn't
bother to do something that helps both you and CLC? You might want to
review your logic there.

>* people answering the simpler questions for themselves means that
newsgroups have more resources available for answering the
/complicated/ questions.

The days of 9600 baud modems being clogged up downloading posts have
thankfully departed.
Yes. That means it's now trivial to download more news articles than
anybody has the time or energy to read and reply to. How, exactly,
does this give us more resources to waste on answering simple questions
that you'd find your answer to more quickly and more easily in a
reference manual?

>* being able to support a question with "I tried looking for X and
only got Y" or "I tried X and got different mysterious result Z"
shows willing and provides extra context and evidence for an answer.

This isn't school, showing willing is irrelevant.
Most people are rather more likely to put time and energy into offering
help if it looks like that help will have some benefit. Demonstrating
that you're unwilling to put any energy into it on your side is a
pretty good clue that it's not worth our resources either.

>OK, so that's three reasons.

3 not very good ones.
*plonk*

dave

Nov 12 '07 #11
Boltar wrote, On 12/11/07 20:13:
Chris Dollin wrote:
>* people learning to find things out for themselves using the search
tools available helps them and the communities they partake in.

If a newsgroup dedicated to C isn't an online community I'm not sure
what is.
Yes, so researching things yourself will help you and this community.
>* people answering the simpler questions for themselves means that
newsgroups have more resources available for answering the
/complicated/ questions.

The days of 9600 baud modems being clogged up downloading posts have
thankfully departed.
Irrelevant. The important resource is the people and their time, and
that is limited.
>* being able to support a question with "I tried looking for X and
only got Y" or "I tried X and got different mysterious result Z"
shows willing and provides extra context and evidence for an answer.

This isn't school, showing willing is irrelevant.
Yes, it isn't a school so we are not being paid to teach you.
>OK, so that's three reasons.

3 not very good ones.
No, three good reasons if you took the time to understand them.

A forth good reason is that you are more likely to get help from the
most knowledgeable if you put in some effort yourself.
--
Flash Gordon
Nov 12 '07 #12
On Nov 12, 9:12 pm, Flash Gordon <s...@flash-gordon.me.ukwro te:
Irrelevant. The important resource is the people and their time, and
that is limited.
Don't talk such rubbish. If people had work to do they wouldn't be on
here browsing the posts in the first place.
Yes, it isn't a school so we are not being paid to teach you.
Not are you being paid to post non-replies. If you have nothing to
say , say nothing.

B2003
Nov 12 '07 #13
Boltar said:

<snip>
The guy was just asking a question. Isn't that the whole point of
these groups?
No. The Q&A aspect of newsgroups is incidental to their original purpose,
which was to exchange and discuss *news* - hence the name "newsgroup" .
Nevertheless, the Q&A serves a useful purpose - that of stimulating
informative discussion - and so it is not only tolerated but encouraged.
But it is certainly not the whole point of the groups.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Nov 12 '07 #14
Boltar said:
On Nov 12, 9:12 pm, Flash Gordon <s...@flash-gordon.me.ukwro te:
>Irrelevant. The important resource is the people and their time, and
that is limited.

Don't talk such rubbish. If people had work to do they wouldn't be on
here browsing the posts in the first place.
>Yes, it isn't a school so we are not being paid to teach you.

Not are you being paid to post non-replies. If you have nothing to
say , say nothing.
Physician, heal thyself. So far, you have had nothing whatsoever to say
about C in this thread or in any other recent thread. Indeed, a Web search
of Google's archives reveals only two articles from you that were posted
before today, both on January 5th, one of which contains an incorrect
claim about C and the other of which contains an acknowledgement that the
claim was incorrect.

If you have nothing to say...

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Nov 12 '07 #15
Boltar wrote:
This isn't school, showing willing is irrelevant.
No, its real life. Being sociable is rewarded. Being petulant and lazy
is dealt with accordingly.

Nov 12 '07 #16
Aditya wrote:
Hi
I am using a line of as
char recvedValues[ROWS][COLUMNS] = {'\0'};
in my code. I get a warning as near initialization for
recvedValues[0].

You get a warning that the error is near the place where you initialise
recvedValues[]. Hence it is "near initialisation for..."
Nov 12 '07 #17
Richard Heathfield <r...@see.sig.i nvalidwrote:
Keith Thompson said:
In fact, this:
{ 0 }
can be used as an initializer for *any* type (but gcc
will warn about it).

Yes, and I dearly wish it wouldn't. The construct is well-
defined,
True.
well-known,
Debatable (though I won't ;-)
and idiomatic.
The author of the warning probably went to the Heathfield
school of C and took the adage 'all variables must be
explicitly initialised' a bit too literally. :-)
To warn against it is ludicrous (but of course
perfectly legal).
Note that (*s++ = *d++) is no less well defined, well-known,
and idiomatic, but it is also given a warning by gcc.

Yet another reason not to get pre-occupied with warnings,
or 'style' as measure of correctness (or incorrectness.)

--
Peter

Nov 13 '07 #18
Boltar wrote:
Chris Dollin wrote:
>* people learning to find things out for themselves using the search
tools available helps them and the communities they partake in.

If a newsgroup dedicated to C isn't an online community I'm not sure
what is.
I believe it is, and /hence/ that people learning how to find things out
for themselves using the search tools available helps that community.

I don't see the point of your intended rebuttal.
>* people answering the simpler questions for themselves means that
newsgroups have more resources available for answering the
/complicated/ questions.

The days of 9600 baud modems being clogged up downloading posts have
thankfully departed.
And are also irrelevant, because the resources I refer to centre on
the /people/.
>* being able to support a question with "I tried looking for X and
only got Y" or "I tried X and got different mysterious result Z"
shows willing and provides extra context and evidence for an answer.

This isn't school, showing willing is irrelevant.
I believe you are mistaken in the consequent.
>OK, so that's three reasons.

3 not very good ones.
Opinions may differ.

--
Chris "diversity" Dollin

Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England

Nov 13 '07 #19
On Nov 12, 10:29 pm, Richard Heathfield <r...@see.sig.i nvalidwrote:
Physician, heal thyself. So far, you have had nothing whatsoever to say
about C in this thread or in any other recent thread. Indeed, a Web search
of Google's archives reveals only two articles from you that were posted
before today, both on January 5th, one of which contains an incorrect
claim about C and the other of which contains an acknowledgement that the
claim was incorrect.
I would suggest you learn to use Google properly, its really not
difficult. Unless you never actually bothered.

Try this:

http://groups.google.com/group/comp....a95b74f04969ee

B2003

Nov 13 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.