This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

volatile void * pointer conversion


Hello

Is there any way to cast a volatile void pointer to e.g. a char pointer,
without getting a warning from gcc ?

Here is the warning:

pci.c:665: warning: cast discards qualifiers from pointer target type


example code:

extern int
pci_copyrom(volatile void * p)
{
	unsigned char * romp;

	romp = (unsigned char *) p;


thanks in advance 

josef


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]