mwcc56800e.exe gives warnings on bean generated code.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mwcc56800e.exe gives warnings on bean generated code.

1,909 Views
oldone1
Contributor II

Did I do something wrong, or is the bean generated code bad?

 

Do I need to turn off some warning?

 

Is the compiler correct, and why doesn't the IDE compile of the same file give the

same warning.

 

Compiling ....  ../CODE/AS1.c
### mwcc56800e.exe Compiler:
#    File: ..\CODE\AS1.c
# ----------------------
#     172:     getReg(SCI0_SCISR);                /* Reset interrupt request fla
gs */
# Warning:                       ^
#   expression has no side effect
### mwcc56800e.exe Compiler:
#     890:   getReg(SCI0_SCISR);                  /* Reset interrupt request fla
gs */
# Warning:                     ^
#   expression has no side effect
### mwcc56800e.exe Compiler:
#     969:     getReg(SCI0_SCISR);                /* Reset interrupt request fla
gs */
# Warning:                       ^
#   expression has no side effect

 

Terry

Labels (1)
Tags (1)
0 Kudos
3 Replies

451 Views
ProcessorExpert
Senior Contributor III

Hello,

it seems that you are using non-default setting of compiler in your project. I have reproduced the same behavior if I switch on the "Expression has no side effect" check box in compiler setting in "C/C++ Warnings" in "Language settings" group.

Generally if you are using Processor Expert tool, the compiler setting in CW should not be changed from default values to avoid any inconvenience unless the user is sure what is he/she doing.

 

best regards
Vojtech Filip
Processor Expert Support Team

Message Edited by ProcessorExpert on 2009-05-26 03:32 PM
0 Kudos

451 Views
oldone1
Contributor II

Tried to use -w with both nounusedexpr and unusedexpr and still gets same warning.

 

Terry

 

../../bin/mwcc56800e.exe  -w unusedexpr -o obj -DBUILDPARTNUMBER=100004 -c -larg
edata -flag slld -MD -str reuse,pool -inline smart -warn on -gccincludes -i ../C
ODE -i ../include -i ../../commonInclude -i ../Sources  ../CODE/AS1.c
### mwcc56800e.exe Compiler:
#    File: ..\CODE\AS1.c
# ----------------------
#     172:     getReg(SCI0_SCISR);                /* Reset interrupt request fla
gs */
# Warning:                       ^
#   expression has no side effect
### mwcc56800e.exe Compiler:
#     890:   getReg(SCI0_SCISR);                  /* Reset interrupt request fla
gs */
# Warning:                     ^
#   expression has no side effect
### mwcc56800e.exe Compiler:
#     969:     getReg(SCI0_SCISR);                /* Reset interrupt request fla
gs */
# Warning:                       ^
#   expression has no side effect
Compiling ....  ../CODE/AS1_services.c
Compiling ....  ../CODE/AS2.c
../../bin/mwcc56800e.exe  -w nounusedexpr -o obj -DBUILDPARTNUMBER=100004 -c -la
rgedata -flag slld -MD -str reuse,pool -inline smart -warn on -gccincludes -i ..
/CODE -i ../include -i ../../commonInclude -i ../Sources  ../CODE/AS2.c
### mwcc56800e.exe Compiler:
#    File: ..\CODE\AS2.c
# ----------------------
#     171:     getReg(SCI1_SCISR);                /* Reset interrupt request fla
gs */
# Warning:                       ^
#   expression has no side effect
### mwcc56800e.exe Compiler:
#     886:   getReg(SCI1_SCISR);                  /* Reset interrupt request fla
gs */
# Warning:                     ^
#   expression has no side effect
### mwcc56800e.exe Compiler:
#     945:     getReg(SCI1_SCISR);                /* Reset interrupt request fla
gs */
# Warning:                       ^
#   expression has no side effect

0 Kudos

451 Views
trytohelp
NXP Employee
NXP Employee

Hi,

 

The better way will be to log it directly in the Technical support system.
Please use Freescale on line support web page.
  - Go to following URL: http://www.freescale.com/TechSupport
  - Click on Submit a Service Request. You will come to a login page.
  - You can submit your request through the web from there.

 

Can you please provide us your example reproducing the issue ?

 

Regards 

Pascal

0 Kudos