From: Pavel Roskin <proski@gnu.org>
To: okias <d.okias@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] v2: rtl8187: micro cleanup
Date: Wed, 17 Feb 2010 13:58:58 -0500 [thread overview]
Message-ID: <1266433138.9050.27.camel@mj> (raw)
In-Reply-To: <c2673ca61002171038u14c7ab2fnf2d3ce2067bd1fd8@mail.gmail.com>
On Wed, 2010-02-17 at 19:38 +0100, okias wrote:
> You have probably right, but when I use my testing program:
>
> #include <stdio.h>
> main() {
> int a;
> printf("%i\n", a);
> a |= 22;
> printf("%i\n", a);
> }
>
> Output is:
> 0
> 22
>
> it look correct to me
That's what I get if compiling for x86_64. If compiling for i386, I get
1258024948
1258024950
It just happens that 0 is on the stack where the variable is allocated,
perhaps as a leftover from another call that used that area on the
stack.
No C standard says that automatic variables are initialized. And
indeed, they are not!
gcc will warn about it with -Wall
Please let's stop this discussion now, as it doesn't belong to the
linux-wireless mailing list.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2010-02-17 18:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 18:15 [PATCH] v2: rtl8187: micro cleanup okias
2010-02-17 18:30 ` Larry Finger
2010-02-17 18:34 ` okias
2010-02-17 18:36 ` Johannes Berg
2010-02-17 18:38 ` okias
2010-02-17 18:58 ` Pavel Roskin [this message]
2010-02-17 19:04 ` okias
2010-02-17 19:13 ` Sedat Dilek
2010-02-17 21:14 ` Hin-Tak Leung
2010-02-17 22:44 ` Pavel Roskin
2010-02-17 20:47 ` Hin-Tak Leung
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=1266433138.9050.27.camel@mj \
--to=proski@gnu.org \
--cc=d.okias@gmail.com \
--cc=linux-wireless@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).