This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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?

Parents
  • 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?

Reply
  • 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?

Children