[Libwebsockets] Configure error

"Andy Green (林安廸)" andy at warmcat.com
Tue Jan 15 15:21:38 CET 2013

On 15/01/13 22:08, the mail apparently from Jack Mitchell included:


> test-server.c: In function ‘callback_http’:
> test-server.c:243:50: error: array subscript is above array bounds
> [-Werror=array-bounds]
> test-server.c:244:47: error: array subscript is above array bounds
> [-Werror=array-bounds]

huh... that's

	pollfd_maps[hash][n].index = pollfd_maps[hash][pollfd_count[hash]].index;
	pollfd_maps[hash][n].fd = pollfd_maps[hash][pollfd_count[hash]].fd;

all of the array indexes are variables...

For the compiler to think it could say there was a problem either hash 
or n would have to have been resolved to be (a big) constant.

I'm not really seeing how that can be legit when it compiles here on gcc 
4.7.2 with pedantic and Wall Werror (and works then).

Is the compiler a bit new or anything?


More information about the Libwebsockets mailing list