From: zou wonder <wonder.zou@gmail.com>
To: david@westcontrol.com
Cc: gcc-help@gcc.gnu.org
Subject: Re: compile with gcc option -O0 or -O
Date: Wed, 21 Sep 2011 02:18:00 -0000 [thread overview]
Message-ID: <CAOXjUBwR5FvwKhX8d5Q1XO_4w5joJ+XSQP5M2eyvjCcgxD6dtQ@mail.gmail.com> (raw)
In-Reply-To: <CAOXjUBz4-bzGpfLVZA9zj-Npe7DJCrn5zj4WAB2N=aqYsWupMQ@mail.gmail.com>
Hi David:
Thanks for your reply, and I will try your suggestion.
Thanks all the guys again.
On Mon, Sep 19, 2011 at 5:56 PM, zou wonder <wonder.zou@gmail.com> wrote:
> Hi All:
> i have just enable -Wall -Wextra. but seem there is no any useful
> infomation. just some things like:
>
> /work/smsc/include/xscmsgqueuemx.h:62: warning: unused parameter ‘seconds’
> /work/smsc/include/xscmsgqueuemx.h:247: warning: unused parameter ‘pri’
> xmmgiwparam.cc: In function ‘uint8 findSCerrInd(TASK_TYPE*,
> GIW_VAR_STR*, uint8*, uint8*, uint8*, uint8*)’:
> xmmgiwparam.cc:555: warning: suggest parentheses around ‘&&’ within ‘||’
> xmmgiwparam.cc: At global scope:
> xmmgiwparam.cc:212: warning: unused parameter ‘type’
> xmmgiwparam.cc:1391: warning: unused parameter ‘task’
> xmmgiwparam.cc:1462: warning: unused parameter ‘task’
> xmmgiwparam.cc:1574: warning: unused parameter ‘msg’
> xmmgiwparam.cc: In function ‘void put_giwu_MOdataInd(GIW_VAR_STR*, giw_asn*)’:
> xmmgiwparam.cc:1946: warning: unused variable ‘address’
> xmmgiwparam.cc: In function ‘void put_giw_up_params(MESSAGE*,
> PRIMITIVE, GIW_VAR_STR*)’:
> xmmgiwparam.cc:2055: warning: unused variable ‘alertingMSaddr’
> xmmgiwparam.cc:2060: warning: unused variable ‘addr_str’
> xmmgiwparam.cc: In function ‘void put_giwd_openReq(GIW_VAR_STR*,
> giw_asn*, ISDNAddress*)’:
> xmmgiwparam.cc:2915: warning: suggest parentheses around ‘&&’ within ‘||’
> xmmgiwparam.cc:2933: warning: suggest parentheses around ‘&&’ within ‘||’
> xmmgiwparam.cc: In function ‘void put_giwd_forwardSMReq(MESSAGE*,
> GIW_VAR_STR*, giw_asn*)’:
> xmmgiwparam.cc:3163: warning: suggest parentheses around ‘&&’ within ‘||’
> xmmgiwparam.cc: At global scope:
> xmmgiwparam.cc:3143: warning: unused parameter ‘msg’
> xmmgiwparam.cc: In function ‘void put_giw_down_params(MESSAGE*,
> PRIMITIVE, GIW_VAR_STR*)’:
> xmmgiwparam.cc:3347: warning: unused variable ‘smRPsmea’
> xmmgiwparam.cc:3348: warning: unused variable ‘scAddrForHLR’
> ,
>
>
>
>
>
>
>
>
> I am wondering now, Could i add the optimization options which is
> enable by -O one by one?
>
> by then, hope i could find which optimization option affect my code?
>
> but I do not know what is the difference options which is owned just by -O?
>
>
> thanks again.
>
> On Fri, Sep 16, 2011 at 5:47 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> On 16 September 2011 10:12, zou wonder wrote:
>>> hi david:
>>> i have tried to enable all the warning option you provided :
>>> and here are some warnings:
>>
>> As Miles said, many of the warning options David suggested are not
>> suitable for all code, you will get most of the benefit just using
>> -Wall -Wextra
>>
>
prev parent reply other threads:[~2011-09-21 2:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 5:04 zou wonder
2011-09-16 5:41 ` Ian Lance Taylor
2011-09-16 7:10 ` David Brown
2011-09-16 7:54 ` Miles Bader
2011-09-16 9:21 ` David Brown
2011-09-16 10:06 ` Miles Bader
2011-09-16 10:35 ` David Brown
2011-09-16 8:27 ` Jeffrey Walton
[not found] ` <CAOXjUBzK0snvjNcpi8D3mK5dmXwzH62XXETyjv+4f6S+LDmXyQ@mail.gmail.com>
[not found] ` <CAOXjUBwW2ghmfsF1OA5DY7hZOz-43r22biSG60VyWaviFau_-Q@mail.gmail.com>
[not found] ` <mcrfwjx6lrk.fsf@coign.corp.google.com>
2011-09-16 9:12 ` zou wonder
2011-09-16 9:32 ` David Brown
2011-09-16 9:47 ` Jonathan Wakely
2011-09-19 9:57 ` zou wonder
2011-09-19 10:32 ` David Brown
2011-09-21 2:18 ` zou wonder [this message]
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=CAOXjUBwR5FvwKhX8d5Q1XO_4w5joJ+XSQP5M2eyvjCcgxD6dtQ@mail.gmail.com \
--to=wonder.zou@gmail.com \
--cc=david@westcontrol.com \
--cc=gcc-help@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).