Compile options, -Wextra fixes
This commit is contained in:
parent
7efd6c82cb
commit
0587bef25e
5 changed files with 10 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
include_directories(${GMRF_INCLUDE_DIR})
|
||||
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS _GNU_SOURCE)
|
||||
|
||||
add_library(mmss_proto_babel MODULE
|
||||
babel.c
|
||||
|
@ -9,4 +10,4 @@ add_library(mmss_proto_babel MODULE
|
|||
tlv_types.c
|
||||
)
|
||||
target_link_libraries(mmss_proto_babel ${MMSS_PROTOCOL_LIB})
|
||||
set_target_properties(mmss_proto_babel PROPERTIES LINK_FLAGS "-Wl,--undefined=mmss_protocol_info")
|
||||
set_target_properties(mmss_proto_babel PROPERTIES COMPILE_FLAGS "-std=c99 -Wall" LINK_FLAGS "-Wl,--undefined=mmss_protocol_info")
|
||||
|
|
|
@ -35,13 +35,13 @@ const char *gmrf_protocol_name = "babel";
|
|||
const char *gmrf_protocol_version = "experimental";
|
||||
|
||||
|
||||
static void send_hellos(gmrf_context_t *ctx, void *arg) {
|
||||
static void send_hellos(gmrf_context_t *ctx, void *arg UNUSED) {
|
||||
gmrf_schedule(ctx->gmrf, send_hellos, NULL, GP_BABEL_HELLO_INTERVAL*10);
|
||||
|
||||
gp_babel_send_hellos(ctx);
|
||||
}
|
||||
|
||||
static void send_updates(gmrf_context_t *ctx, void *arg) {
|
||||
static void send_updates(gmrf_context_t *ctx, void *arg UNUSED) {
|
||||
gmrf_schedule(ctx->gmrf, send_updates, NULL, GP_BABEL_UPDATE_INTERVAL*10);
|
||||
|
||||
gmrf_logf(ctx->gmrf, LOG_DEBUG, "sending periodic updates.");
|
||||
|
@ -128,7 +128,7 @@ static void maintain_routes(gmrf_context_t *ctx) {
|
|||
}
|
||||
}
|
||||
|
||||
static void maintenance(gmrf_context_t *ctx, void *arg) {
|
||||
static void maintenance(gmrf_context_t *ctx, void *arg UNUSED) {
|
||||
gmrf_schedule(ctx->gmrf, maintenance, NULL, GP_BABEL_MAINTENANCE_INTERVAL*10);
|
||||
|
||||
maintain_neighbours(ctx);
|
||||
|
|
|
@ -64,7 +64,7 @@ gp_babel_route_t* gp_babel_route_get(gmrf_context_t *ctx, const gp_babel_node_id
|
|||
return route;
|
||||
}
|
||||
|
||||
void gp_babel_route_free(gmrf_context_t *ctx, gp_babel_route_t *route) {
|
||||
void gp_babel_route_free(gmrf_context_t *ctx UNUSED, gp_babel_route_t *route) {
|
||||
free(route);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static void handle_tlv_ack_req(gmrf_context_t *ctx, const gp_babel_tlv_ack_req_t
|
|||
gp_babel_send_ack(ctx, get_tlv_neigh(ctx, arg), ntohs(tlv->nonce));
|
||||
}
|
||||
|
||||
static void handle_tlv_ack(gmrf_context_t *ctx, const gp_babel_tlv_ack_t *tlv, size_t len, handle_tlv_arg_t *arg) {
|
||||
static void handle_tlv_ack(gmrf_context_t *ctx, const gp_babel_tlv_ack_t *tlv UNUSED, size_t len, handle_tlv_arg_t *arg UNUSED) {
|
||||
if (len < sizeof(gp_babel_tlv_ack_t)) {
|
||||
gmrf_logf(ctx->gmrf, LOG_WARNING, "received short acknowledement TLV.");
|
||||
return;
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#include <gmrf/gmrf.h>
|
||||
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
||||
|
||||
#define GP_BABEL_NODE_ID_LENGTH 8
|
||||
|
||||
typedef struct __attribute__((packed)) gp_gabel_node_id {
|
||||
|
|
Reference in a new issue