How to suppress a specific compiler warning message CW 11.1

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

How to suppress a specific compiler warning message CW 11.1

Jump to solution
1,171 Views
lslonim
Contributor II

Hi, I'm using CW 11.1 because my processor is MC9S08DZ60A. I am porting some code from another compiler. I would like to suppress compiler warning C1420, return value ignored, because it flags every printf. I found a screen that looks likely, but I put C1420 in there, and also tried just 1420, and the warnings still come up. See attached screenshot.

Is there a way to stop a specific warning message number, or a list of them?

Thanks,

Lloyd

0 Kudos
Reply
1 Solution
1,156 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi @lslonim 

Please add  -WmsgSd1420 to compiler setting to disable C1420

ZhangJennie_1-1744860548332.png

 

 

Thanks,

Jun Zhang

View solution in original post

0 Kudos
Reply
2 Replies
1,141 Views
lslonim
Contributor II

Thank you so much! That worked! Then I added more on the same line like this:

-WmsgSd1420 -WmsgSd2705

I appreciate the help!

Lloyd

0 Kudos
Reply
1,157 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi @lslonim 

Please add  -WmsgSd1420 to compiler setting to disable C1420

ZhangJennie_1-1744860548332.png

 

 

Thanks,

Jun Zhang

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2082068%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20suppress%20a%20specific%20compiler%20warning%20message%20CW%2011.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082068%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%20I'm%20using%20CW%2011.1%20because%20my%20processor%20is%20MC9S08DZ60A.%20I%20am%20porting%20some%20code%20from%20another%20compiler.%20I%20would%20like%20to%20suppress%20compiler%20warning%20C1420%2C%20return%20value%20ignored%2C%20because%20it%20flags%20every%20printf.%20I%20found%20a%20screen%20that%20looks%20likely%2C%20but%20I%20put%20C1420%20in%20there%2C%20and%20also%20tried%20just%201420%2C%20and%20the%20warnings%20still%20come%20up.%20See%20attached%20screenshot.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20stop%20a%20specific%20warning%20message%20number%2C%20or%20a%20list%20of%20them%3F%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ELloyd%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082640%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20suppress%20a%20specific%20compiler%20warning%20message%20CW%2011.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082640%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20so%20much!%20That%20worked!%20Then%20I%20added%20more%20on%20the%20same%20line%20like%20this%3A%3C%2FP%3E%3CP%3E-WmsgSd1420%20-WmsgSd2705%3C%2FP%3E%3CP%3EI%20appreciate%20the%20help!%3C%2FP%3E%3CP%3ELloyd%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082181%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20suppress%20a%20specific%20compiler%20warning%20message%20CW%2011.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082181%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F249155%22%20target%3D%22_blank%22%3E%40lslonim%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20add%26nbsp%3B%20-WmsgSd1420%20to%20compiler%20setting%20to%20disable%20C1420%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ZhangJennie_1-1744860548332.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ZhangJennie_1-1744860548332.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333572i6E6B4E04317F7D88%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ZhangJennie_1-1744860548332.png%22%20alt%3D%22ZhangJennie_1-1744860548332.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3EJun%20Zhang%3C%2FP%3E%3C%2FLINGO-BODY%3E