'dma_cache_sync' discards qualifiers from pointer target type /SRCTREE/drivers/net/lib82596.c: In function 'i596_interrupt': /SRCTREE/drivers/net/lib82596.c:1266: warning: passing argument 2 of 'dma_cache_sync' discards qualifiers from pointer target type /SRCTREE/drivers/net/lib82596.c...
> 'dma_cache_sync' discards qualifiers from pointer target type You're passing a volatile pointer to a function which is expecting a non-volatile pointer. That's potentially dangerous, so gcc warns about it. The normal way to fix this would be to add a volatile attribute to the argument ...
but that was due to bugs in the compiler, where const wasn't propagated around correctly internally, so, instead of pestering the user with error messages they could not fix, we just made it a warning by default. The idea was eventually we'd weed them all out and make it an ...
control it. -Wno-cast-qual doesn't seem like the right choice, as there is no user cast here. Maybe something like -Wno-discard- qual, where -Wdiscard-qual is the default. I notice that these are pedwarns, In that case, we can enable it only when -pedantic is used (like many pe...
Re: [RFC] warning: initialization discards qualifiers from pointer target type Eric Christopher Mon, 18 Apr 2005 21:23:26 -0700 > > > > Though of course, this doesn't mean that we can't have an option to > > control it. -Wno-cast-qual doesn't seem like the right choice, as >...