Skip to contentSkip to conversation

Kernel module compiler warnings

DISCUSSION Jack 1 participant 1 message Dec 20, 2008

lore
Share & tools
lore

Jack

author
#0 lore raw

Could someone kindly explain why I see these warnings:

warning: passing argument X of 'SOME_TYPE_HERE' discards qualifiers from pointer target type.

I know *what* is causing the error - it's a cast removing a const

e.g.

void foo(const my_type *a)

{
	bar( (my_type*)a );
}

What I don't understand is that it only seems to be emitted when I compile on my 32 bit machine. Compiling on my 64bit machine does not generate this warning

Thank you,
Jack