azunite / netmap

Automatically exported from code.google.com/p/netmap
0 stars 0 forks source link

P2NMD discards const qualifier from pointer target type #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open examples/GNUMakefile
2. Add -Werror=cast-qual to CFLAGS
3. make bridge

What is the expected output? What do you see instead?

I get:

cc -O2 -pipe -Werror -Wall -Wunused-function -Werror=cast-qual -I ../sys  
-Wextra -DNO_PCAP   -c -o bridge.o bridge.c
In file included from bridge.c:14:0:
../sys/net/netmap_user.h: In function ‘nm_open’:
../sys/net/netmap_user.h:234:20: error: cast discards 
‘__attribute__((const))’ qualifier from pointer target type 
[-Werror=cast-qual]
 #define P2NMD(p)  ((struct nm_desc *)(p))

What version of the product are you using? On what operating system?

I'm using v11.1, but the issue has been present for a while it seems.

Please provide any additional information below.

Original issue reported on code.google.com by ciprian....@linaro.org on 30 Oct 2014 at 10:07