Discussion Forum

warning: #191-D: type qualifier is meaningless on cast type

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Pan Xiaofeng
Posted
24-Dec-2007 02:49 GMT
Toolset
ARM
New! warning: #191-D: type qualifier is meaningless on cast type

Theer is a register defined as:

typedef union _NVIC_ST_RELOAD_t
{ INT32U Word; struct { INT32U reserved : 8; INT32U reloadvalue : 24; }Bits;
}NVIC_ST_RELOAD_STRUCT, *pNVIC_ST_RELOAD_STRUCT;

#define NVIC_ST_CTRL 0xE000E010

#define Reg_NVIC_ST_CTRL (*((volatile pNVIC_ST_CTRL_STRUCT)(NVIC_ST_CTRL)))

but it generates waring when I compile it with RVDS v3.11, the warning as follow:

warning: #191-D: type qualifier is meaningless on cast type.

but the warning is not generated with ADS v1.2.

How do I solve the warning?

Read-Only
Author
Dan Henry
Posted
24-Dec-2007 05:50 GMT
Toolset
ARM
New! RE: warning: #191-D: type qualifier is meaningless on cast type

Without posting the code that produces the error; that is, the code submitted to the preprocessor to actually expand 'Reg_NVIC_ST_CTRL' for subsequent compilation, it's a bit hard to say, but maybe somebody will give it a go.

If you find there's a lack of interest in your problem, try posting the relevant code with code formatting preserved. Gee, I've got a link that will show you how. Now where did I leave it?

Read-Only
Author
Dan Henry
Posted
24-Dec-2007 05:52 GMT
Toolset
ARM
New! RE: warning: #191-D: type qualifier is meaningless on cast type

"Gee, I've got a link that will show you how. Now where did I leave it?"

Oh, here it is:

http://www.danlhenry.com/caps/keil_code.png

Next Thread | Thread List | Previous Thread Start a Thread | Settings