UnoffLandz / unoff-landz

open source server for the eternal lands/other life client
9 stars 4 forks source link

build warnings : unused parameter ‘revents’ #2

Closed themuntdregger closed 10 years ago

themuntdregger commented 10 years ago

Arises from the following functions in main.c -

a) void recv_data(struct ev_loop loop, struct ev_io watcher, int revents) b) void accept_client(struct ev_loop loop, struct ev_io watcher, int revents)

The revents variable is unused and results in the compiler warning [ warning: unused parameter ‘revents’ ]. However, removing revents from the function declaration causes another error [ warning: assignment from incompatible pointer type ]

Neither error breaks compilation and the issue (effecting the libev library) is fairly well documented. The author of the libev indicates that the warning is not a bug and is otherwise unavoidable unless you turn off that warning on the compiler.

Not sure how this can be resolved, except by replacing libev with libevent. However, the latter is reported as being less efficient.

themuntdregger commented 10 years ago

sorted by adding (void) (timer) after function declaration